]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #5729: Nested striped tables v2.2.2
authorMark Otto <otto@github.com>
Sat, 8 Dec 2012 20:57:21 +0000 (12:57 -0800)
committerMark Otto <otto@github.com>
Sat, 8 Dec 2012 20:57:21 +0000 (12:57 -0800)
* 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

docs/assets/css/bootstrap.css
less/tables.less

index c0838edc5c46440cb170f5825ead064097763220..8ab3cefcf71da9e4ba7e40edea3eff786a06cc31 100644 (file)
@@ -2012,6 +2012,10 @@ table {
   border-top: 2px solid #dddddd;
 }
 
+.table .table {
+  background-color: #ffffff;
+}
+
 .table-condensed th,
 .table-condensed td {
   padding: 4px 5px;
@@ -2104,8 +2108,8 @@ table {
   -moz-border-radius-topright: 4px;
 }
 
-.table-striped tbody tr:nth-child(odd) td,
-.table-striped tbody tr:nth-child(odd) th {
+.table-striped tbody > tr:nth-child(odd) > td,
+.table-striped tbody > tr:nth-child(odd) > th {
   background-color: #f9f9f9;
 }
 
index b816e7c2d264f54d6784817dbc35fe4df19c0223..f3b9967f07b61d9f72605c55464de586968562b7 100644 (file)
@@ -48,6 +48,11 @@ table {
   tbody + tbody {
     border-top: 2px solid @tableBorder;
   }
+
+  // Nesting
+  .table {
+    background-color: @bodyBackground;
+  }
 }
 
 
@@ -143,8 +148,8 @@ table {
 // Default zebra-stripe styles (alternating gray and transparent backgrounds)
 .table-striped {
   tbody {
-    tr:nth-child(odd) td,
-    tr:nth-child(odd) th {
+    > tr:nth-child(odd) > td,
+    > tr:nth-child(odd) > th {
       background-color: @tableBackgroundAccent;
     }
   }