2020-03-24 15:00:00 +01: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));
|
2021-10-11 16:41:43 +02:00
|
|
|
$border-color: mix($color, $background, percentage($table-border-factor));
|
2020-03-24 15:00:00 +01:00
|
|
|
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
--#{$prefix}table-color: #{$color};
|
|
|
|
--#{$prefix}table-bg: #{$background};
|
|
|
|
--#{$prefix}table-border-color: #{$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)};
|
2020-03-24 15:00:00 +01:00
|
|
|
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}table-color);
|
|
|
|
border-color: var(--#{$prefix}table-border-color);
|
2020-03-24 15:00:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// scss-docs-end table-variant
|