diff --git a/docs/4.0/content/tables.md b/docs/4.0/content/tables.md index 8d4fcfe64f..db05e8378c 100644 --- a/docs/4.0/content/tables.md +++ b/docs/4.0/content/tables.md @@ -438,19 +438,11 @@ Add `.table-sm` to make tables more compact by cutting cell padding in half. Use contextual classes to color table rows or individual cells. -| Class | Description | -| --- | --- | -| `.table-active` | Applies the hover color to a particular row or cell | -| `.table-success` | Indicates a successful or positive action | -| `.table-info` | Indicates a neutral informative change or action | -| `.table-warning` | Indicates a warning that might need attention | -| `.table-danger` | Indicates a dangerous or potentially negative action | -
- + @@ -458,59 +450,25 @@ Use contextual classes to color table rows or individual cells. - + - + - - + + {% for color in site.data.theme-colors %} + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {% endfor %}
#Type Column heading Column heading Column heading
1Active Column content Column content Column content
2Default Column content Column content Column content
3
{{ color.name | capitalize }} Column content Column content Column content
4Column contentColumn contentColumn content
5Column contentColumn contentColumn content
6Column contentColumn contentColumn content
7Column contentColumn contentColumn content
8Column contentColumn contentColumn content
9Column contentColumn contentColumn content
@@ -518,18 +476,14 @@ Use contextual classes to color table rows or individual cells. {% highlight html %} ... -... -... -... -... +{% for color in site.data.theme-colors %} +...{% endfor %} ... - ... - ... - ... - ... + {% for color in site.data.theme-colors %} + ...{% endfor %} {% endhighlight %} diff --git a/scss/_tables.scss b/scss/_tables.scss index 90a5e69bb9..8b1f551a0d 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -92,12 +92,9 @@ // Exact selectors below required to override `.table-striped` and prevent // inheritance to nested tables. -// Generate the contextual variants -@include table-row-variant(active, $table-active-bg); -@include table-row-variant(success, $state-success-bg); -@include table-row-variant(info, $state-info-bg); -@include table-row-variant(warning, $state-warning-bg); -@include table-row-variant(danger, $state-danger-bg); +@each $color, $value in $theme-colors { + @include table-row-variant($color, theme-color-level($color, -9)); +} // Inverse styles