mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
22 lines
868 B
SCSS
22 lines
868 B
SCSS
// scss-docs-start table-variant
|
|
@mixin table-variant($state, $background) {
|
|
.table-#{$state} {
|
|
$color: color-contrast(opaque($body-bg, $background));
|
|
$hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
|
|
$striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
|
|
$active-bg: mix($color, $background, percentage($table-active-bg-factor));
|
|
|
|
--bs-table-bg: #{$background};
|
|
--bs-table-striped-bg: #{$striped-bg};
|
|
--bs-table-striped-color: #{color-contrast($striped-bg)};
|
|
--bs-table-active-bg: #{$active-bg};
|
|
--bs-table-active-color: #{color-contrast($active-bg)};
|
|
--bs-table-hover-bg: #{$hover-bg};
|
|
--bs-table-hover-color: #{color-contrast($hover-bg)};
|
|
|
|
color: $color;
|
|
border-color: mix($color, $background, percentage($table-border-factor));
|
|
}
|
|
}
|
|
// scss-docs-end table-variant
|