2021-07-07 11:12:38 +00:00
|
|
|
// 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));
|
2022-11-04 15:49:41 +00:00
|
|
|
$table-border-color: mix($color, $background, percentage($table-border-factor));
|
2021-07-07 11:12:38 +00:00
|
|
|
|
2022-11-04 15:49:41 +00:00
|
|
|
--#{$prefix}table-color: #{$color};
|
|
|
|
--#{$prefix}table-bg: #{$background};
|
|
|
|
--#{$prefix}table-border-color: #{$table-border-color};
|
|
|
|
--#{$prefix}table-striped-bg: #{$striped-bg};
|
|
|
|
--#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
|
|
|
|
--#{$prefix}table-active-bg: #{$active-bg};
|
|
|
|
--#{$prefix}table-active-color: #{color-contrast($active-bg)};
|
|
|
|
--#{$prefix}table-hover-bg: #{$hover-bg};
|
|
|
|
--#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
|
2021-07-07 11:12:38 +00:00
|
|
|
|
2022-11-04 15:49:41 +00:00
|
|
|
color: var(--#{$prefix}table-color);
|
|
|
|
border-color: var(--#{$prefix}table-border-color);
|
2021-07-07 11:12:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// scss-docs-end table-variant
|