Commit 9376a7c2 authored by Mark Otto's avatar Mark Otto
Browse files

Fixes #5729: Nested striped tables

* Scopes striping to immediate children of the tbody and tr
* For nested tables, sets a background color of @bodyBackground, to override the default transparent bg
parent cacc2137
Showing with 13 additions and 4 deletions
+13 -4
...@@ -2012,6 +2012,10 @@ table { ...@@ -2012,6 +2012,10 @@ table {
border-top: 2px solid #dddddd; border-top: 2px solid #dddddd;
} }
.table .table {
background-color: #ffffff;
}
.table-condensed th, .table-condensed th,
.table-condensed td { .table-condensed td {
padding: 4px 5px; padding: 4px 5px;
...@@ -2104,8 +2108,8 @@ table { ...@@ -2104,8 +2108,8 @@ table {
-moz-border-radius-topright: 4px; -moz-border-radius-topright: 4px;
} }
.table-striped tbody tr:nth-child(odd) td, .table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody tr:nth-child(odd) th { .table-striped tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9; background-color: #f9f9f9;
} }
......
...@@ -48,6 +48,11 @@ table { ...@@ -48,6 +48,11 @@ table {
tbody + tbody { tbody + tbody {
border-top: 2px solid @tableBorder; border-top: 2px solid @tableBorder;
} }
// Nesting
.table {
background-color: @bodyBackground;
}
} }
...@@ -143,8 +148,8 @@ table { ...@@ -143,8 +148,8 @@ table {
// Default zebra-stripe styles (alternating gray and transparent backgrounds) // Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped { .table-striped {
tbody { tbody {
tr:nth-child(odd) td, > tr:nth-child(odd) > td,
tr:nth-child(odd) th { > tr:nth-child(odd) > th {
background-color: @tableBackgroundAccent; background-color: @tableBackgroundAccent;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment