mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 08:39:56 +02:00
Prevent nested tables style leaks
This commit is contained in:
21
scss/mixins/_table-variants.scss
Normal file
21
scss/mixins/_table-variants.scss
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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));
|
||||
|
||||
--table-bg: #{$background};
|
||||
--table-striped-bg: #{$striped-bg};
|
||||
--table-striped-color: #{color-contrast($striped-bg)};
|
||||
--table-active-bg: #{$active-bg};
|
||||
--table-active-color: #{color-contrast($active-bg)};
|
||||
--table-hover-bg: #{$hover-bg};
|
||||
--table-hover-color: #{color-contrast($hover-bg)};
|
||||
|
||||
color: $color;
|
||||
border-color: mix($color, $background, percentage($table-border-factor));
|
||||
}
|
||||
}
|
||||
// scss-docs-end table-variant
|
Reference in New Issue
Block a user