]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Scope .table-bordered styles to immediate children only
authorMark Otto <otto@github.com>
Fri, 3 May 2013 21:56:57 +0000 (14:56 -0700)
committerMark Otto <otto@github.com>
Fri, 3 May 2013 21:56:57 +0000 (14:56 -0700)
docs/assets/css/bootstrap.css
less/tables.less

index a17a47128105ae0af7ee5cdb19a1d1526dd258d4..9df8dc84e9f2e5a8f5e4a7d63e57acdaed5c8b2b 100644 (file)
@@ -1073,72 +1073,72 @@ th {
   border-radius: 4px;
 }
 
-.table-bordered thead > tr > th,
-.table-bordered tbody > tr > th,
-.table-bordered thead > tr > td,
-.table-bordered tbody > tr > td {
+.table-bordered thead > tr > th,
+.table-bordered tbody > tr > th,
+.table-bordered thead > tr > td,
+.table-bordered tbody > tr > td {
   border-left: 1px solid #dddddd;
 }
 
-.table-bordered caption + thead > tr:first-child th,
-.table-bordered caption + tbody > tr:first-child th,
-.table-bordered caption + tbody > tr:first-child td,
-.table-bordered colgroup + thead > tr:first-child th,
-.table-bordered colgroup + tbody > tr:first-child th,
-.table-bordered colgroup + tbody > tr:first-child td,
-.table-bordered thead:first-child > tr:first-child th,
-.table-bordered tbody:first-child > tr:first-child th,
-.table-bordered tbody:first-child > tr:first-child td {
+.table-bordered caption + thead > tr:first-child th,
+.table-bordered caption + tbody > tr:first-child th,
+.table-bordered caption + tbody > tr:first-child td,
+.table-bordered colgroup + thead > tr:first-child th,
+.table-bordered colgroup + tbody > tr:first-child th,
+.table-bordered colgroup + tbody > tr:first-child td,
+.table-bordered thead:first-child > tr:first-child th,
+.table-bordered tbody:first-child > tr:first-child th,
+.table-bordered tbody:first-child > tr:first-child td {
   border-top: 0;
 }
 
-.table-bordered thead:first-child > tr:first-child > th:first-child,
-.table-bordered tbody:first-child > tr:first-child > td:first-child,
-.table-bordered tbody:first-child > tr:first-child > th:first-child {
+.table-bordered thead:first-child > tr:first-child > th:first-child,
+.table-bordered tbody:first-child > tr:first-child > td:first-child,
+.table-bordered tbody:first-child > tr:first-child > th:first-child {
   border-top-left-radius: 4px;
 }
 
-.table-bordered thead:first-child > tr:first-child > th:last-child,
-.table-bordered tbody:first-child > tr:first-child > td:last-child,
-.table-bordered tbody:first-child > tr:first-child > th:last-child {
+.table-bordered thead:first-child > tr:first-child > th:last-child,
+.table-bordered tbody:first-child > tr:first-child > td:last-child,
+.table-bordered tbody:first-child > tr:first-child > th:last-child {
   border-top-right-radius: 4px;
 }
 
-.table-bordered thead:last-child > tr:last-child > th:first-child,
-.table-bordered tbody:last-child > tr:last-child > td:first-child,
-.table-bordered tbody:last-child > tr:last-child > th:first-child,
-.table-bordered tfoot:last-child > tr:last-child > td:first-child,
-.table-bordered tfoot:last-child > tr:last-child > th:first-child {
+.table-bordered thead:last-child > tr:last-child > th:first-child,
+.table-bordered tbody:last-child > tr:last-child > td:first-child,
+.table-bordered tbody:last-child > tr:last-child > th:first-child,
+.table-bordered tfoot:last-child > tr:last-child > td:first-child,
+.table-bordered tfoot:last-child > tr:last-child > th:first-child {
   border-bottom-left-radius: 4px;
 }
 
-.table-bordered thead:last-child > tr:last-child > th:last-child,
-.table-bordered tbody:last-child > tr:last-child > td:last-child,
-.table-bordered tbody:last-child > tr:last-child > th:last-child,
-.table-bordered tfoot:last-child > tr:last-child > td:last-child,
-.table-bordered tfoot:last-child > tr:last-child > th:last-child {
+.table-bordered thead:last-child > tr:last-child > th:last-child,
+.table-bordered tbody:last-child > tr:last-child > td:last-child,
+.table-bordered tbody:last-child > tr:last-child > th:last-child,
+.table-bordered tfoot:last-child > tr:last-child > td:last-child,
+.table-bordered tfoot:last-child > tr:last-child > th:last-child {
   border-bottom-right-radius: 4px;
 }
 
-.table-bordered tfoot + tbody:last-child > tr:last-child > td:first-child {
+.table-bordered tfoot + tbody:last-child > tr:last-child > td:first-child {
   border-bottom-left-radius: 0;
 }
 
-.table-bordered tfoot + tbody:last-child > tr:last-child > td:last-child {
+.table-bordered tfoot + tbody:last-child > tr:last-child > td:last-child {
   border-bottom-right-radius: 0;
 }
 
-.table-bordered caption + thead > tr:first-child > th:first-child,
-.table-bordered caption + tbody > tr:first-child > td:first-child,
-.table-bordered colgroup + thead > tr:first-child > th:first-child,
-.table-bordered colgroup + tbody > tr:first-child > td:first-child {
+.table-bordered caption + thead > tr:first-child > th:first-child,
+.table-bordered caption + tbody > tr:first-child > td:first-child,
+.table-bordered colgroup + thead > tr:first-child > th:first-child,
+.table-bordered colgroup + tbody > tr:first-child > td:first-child {
   border-top-left-radius: 4px;
 }
 
-.table-bordered caption + thead > tr:first-child > th:last-child,
-.table-bordered caption + tbody > tr:first-child > td:last-child,
-.table-bordered colgroup + thead > tr:first-child > th:last-child,
-.table-bordered colgroup + tbody > tr:first-child > td:last-child {
+.table-bordered caption + thead > tr:first-child > th:last-child,
+.table-bordered caption + tbody > tr:first-child > td:last-child,
+.table-bordered colgroup + thead > tr:first-child > th:last-child,
+.table-bordered colgroup + tbody > tr:first-child > td:last-child {
   border-top-right-radius: 4px;
 }
 
index 15db5a68a380ea9892a8f4c38281aa98e649bdf4..5c8fe82ad85fcf3c8ab35fd73a64199218fb2ed6 100644 (file)
@@ -76,72 +76,73 @@ th {
   border-collapse: separate; // Done so we can round those corners!
   border-left: 0;
   border-radius: @border-radius-base;
-  thead > tr > th,
-  tbody > tr > th,
-  thead > tr > td,
-  tbody > tr > td {
+
+  > thead > tr > th,
+  > tbody > tr > th,
+  > thead > tr > td,
+  > tbody > tr > td {
     border-left: 1px solid @table-border-color;
   }
   // Prevent a double border
-  caption + thead > tr:first-child th,
-  caption + tbody > tr:first-child th,
-  caption + tbody > tr:first-child td,
-  colgroup + thead > tr:first-child th,
-  colgroup + tbody > tr:first-child th,
-  colgroup + tbody > tr:first-child td,
-  thead:first-child > tr:first-child th,
-  tbody:first-child > tr:first-child th,
-  tbody:first-child > tr:first-child td {
+  caption + thead > tr:first-child th,
+  caption + tbody > tr:first-child th,
+  caption + tbody > tr:first-child td,
+  colgroup + thead > tr:first-child th,
+  colgroup + tbody > tr:first-child th,
+  colgroup + tbody > tr:first-child td,
+  thead:first-child > tr:first-child th,
+  tbody:first-child > tr:first-child th,
+  tbody:first-child > tr:first-child td {
     border-top: 0;
   }
   // For first th/td in the first row in the first thead or tbody
-  thead:first-child > tr:first-child > th:first-child,
-  tbody:first-child > tr:first-child > td:first-child,
-  tbody:first-child > tr:first-child > th:first-child {
+  thead:first-child > tr:first-child > th:first-child,
+  tbody:first-child > tr:first-child > td:first-child,
+  tbody:first-child > tr:first-child > th:first-child {
     border-top-left-radius: @border-radius-base;
   }
   // For last th/td in the first row in the first thead or tbody
-  thead:first-child > tr:first-child > th:last-child,
-  tbody:first-child > tr:first-child > td:last-child,
-  tbody:first-child > tr:first-child > th:last-child {
+  thead:first-child > tr:first-child > th:last-child,
+  tbody:first-child > tr:first-child > td:last-child,
+  tbody:first-child > tr:first-child > th:last-child {
     border-top-right-radius: @border-radius-base;
   }
   // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
-  thead:last-child > tr:last-child > th:first-child,
-  tbody:last-child > tr:last-child > td:first-child,
-  tbody:last-child > tr:last-child > th:first-child,
-  tfoot:last-child > tr:last-child > td:first-child,
-  tfoot:last-child > tr:last-child > th:first-child {
+  thead:last-child > tr:last-child > th:first-child,
+  tbody:last-child > tr:last-child > td:first-child,
+  tbody:last-child > tr:last-child > th:first-child,
+  tfoot:last-child > tr:last-child > td:first-child,
+  tfoot:last-child > tr:last-child > th:first-child {
     border-bottom-left-radius: @border-radius-base;
   }
   // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
-  thead:last-child > tr:last-child > th:last-child,
-  tbody:last-child > tr:last-child > td:last-child,
-  tbody:last-child > tr:last-child > th:last-child,
-  tfoot:last-child > tr:last-child > td:last-child,
-  tfoot:last-child > tr:last-child > th:last-child {
+  thead:last-child > tr:last-child > th:last-child,
+  tbody:last-child > tr:last-child > td:last-child,
+  tbody:last-child > tr:last-child > th:last-child,
+  tfoot:last-child > tr:last-child > td:last-child,
+  tfoot:last-child > tr:last-child > th:last-child {
     border-bottom-right-radius: @border-radius-base;
   }
 
   // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
-  tfoot + tbody:last-child > tr:last-child > td:first-child {
+  tfoot + tbody:last-child > tr:last-child > td:first-child {
     border-bottom-left-radius: 0;
   }
-  tfoot + tbody:last-child > tr:last-child > td:last-child {
+  tfoot + tbody:last-child > tr:last-child > td:last-child {
     border-bottom-right-radius: 0;
   }
 
   // Special fixes to round the left border on the first td/th
-  caption + thead > tr:first-child > th:first-child,
-  caption + tbody > tr:first-child > td:first-child,
-  colgroup + thead > tr:first-child > th:first-child,
-  colgroup + tbody > tr:first-child > td:first-child {
+  caption + thead > tr:first-child > th:first-child,
+  caption + tbody > tr:first-child > td:first-child,
+  colgroup + thead > tr:first-child > th:first-child,
+  colgroup + tbody > tr:first-child > td:first-child {
     border-top-left-radius: @border-radius-base;
   }
-  caption + thead > tr:first-child > th:last-child,
-  caption + tbody > tr:first-child > td:last-child,
-  colgroup + thead > tr:first-child > th:last-child,
-  colgroup + tbody > tr:first-child > td:last-child {
+  caption + thead > tr:first-child > th:last-child,
+  caption + tbody > tr:first-child > td:last-child,
+  colgroup + thead > tr:first-child > th:last-child,
+  colgroup + tbody > tr:first-child > td:last-child {
     border-top-right-radius: @border-radius-base;
   }