mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
table: Add border color relative to theme for accessibility (#25755)
This commit is contained in:
parent
282b77ee9c
commit
a86aef0ae0
@ -100,7 +100,7 @@
|
|||||||
// inheritance to nested tables.
|
// inheritance to nested tables.
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $theme-colors {
|
||||||
@include table-row-variant($color, theme-color-level($color, -9));
|
@include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
|
||||||
}
|
}
|
||||||
|
|
||||||
@include table-row-variant(active, $table-active-bg);
|
@include table-row-variant(active, $table-active-bg);
|
||||||
|
@ -349,6 +349,9 @@ $table-striped-order: odd !default;
|
|||||||
|
|
||||||
$table-caption-color: $text-muted !default;
|
$table-caption-color: $text-muted !default;
|
||||||
|
|
||||||
|
$table-bg-level: -9 !default;
|
||||||
|
$table-border-level: -6 !default;
|
||||||
|
|
||||||
|
|
||||||
// Buttons + Forms
|
// Buttons + Forms
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Tables
|
// Tables
|
||||||
|
|
||||||
@mixin table-row-variant($state, $background) {
|
@mixin table-row-variant($state, $background, $border: null) {
|
||||||
// Exact selectors below required to override `.table-striped` and prevent
|
// Exact selectors below required to override `.table-striped` and prevent
|
||||||
// inheritance to nested tables.
|
// inheritance to nested tables.
|
||||||
.table-#{$state} {
|
.table-#{$state} {
|
||||||
@ -9,6 +9,15 @@
|
|||||||
> td {
|
> td {
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if $border != null {
|
||||||
|
th,
|
||||||
|
td,
|
||||||
|
thead th,
|
||||||
|
tbody + tbody {
|
||||||
|
border-color: $border;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hover states for `.table-hover`
|
// Hover states for `.table-hover`
|
||||||
|
Loading…
Reference in New Issue
Block a user