@mixin table-row-variant($state, $background, $border: null) { .table-#{$state} { &, > th, > td { background-color: $background; } @if $border != null { th, td, thead th, tbody + tbody { border-color: $border; } } } .table-hover { $hover-background: darken($background, 5%); .table-#{$state} { @include hover() { background-color: $hover-background; > td, > th { background-color: $hover-background; } } } } }