vendor/assets/stylesheets/twitter/_tables.scss in sass-twitter-bootstrap-2.2.1 vs vendor/assets/stylesheets/twitter/_tables.scss in sass-twitter-bootstrap-2.2.2

- old
+ new

@@ -46,10 +46,15 @@ } // Account for multiple tbody instances tbody + tbody { border-top: 2px solid $tableBorder; } + + // Nesting + .table { + background-color: $bodyBackground; + } } // CONDENSED TABLE W/ HALF PADDING @@ -87,55 +92,51 @@ tbody:first-child tr:first-child th, tbody:first-child tr:first-child td { border-top: 0; } // For first th or 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 { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; + thead:first-child tr:first-child > th:first-child, + tbody:first-child tr:first-child > td:first-child { + @include border-top-left-radius($baseBorderRadius); } - thead:first-child tr:first-child th:last-child, - tbody:first-child tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; + thead:first-child tr:first-child > th:last-child, + tbody:first-child tr:first-child > td:last-child { + @include border-top-right-radius($baseBorderRadius); } - // For first th or td in the first row in the first thead or tbody - thead:last-child tr:last-child th:first-child, - tbody:last-child tr:last-child td:first-child, - tfoot:last-child tr:last-child td:first-child { - @include border-radius(0 0 0 4px); - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; + // For first th or td in the last row in the last thead or tbody + thead:last-child tr:last-child > th:first-child, + tbody:last-child tr:last-child > td:first-child, + tfoot:last-child tr:last-child > td:first-child { + @include border-bottom-left-radius($baseBorderRadius); } - thead:last-child tr:last-child th:last-child, - tbody:last-child tr:last-child td:last-child, - tfoot:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; + thead:last-child tr:last-child > th:last-child, + tbody:last-child tr:last-child > td:last-child, + tfoot:last-child tr:last-child > td:last-child { + @include border-bottom-right-radius($baseBorderRadius); } + // 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 { + @include border-bottom-left-radius(0); + } + tfoot + tbody:last-child tr:last-child td:last-child { + @include 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 { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; + @include border-top-left-radius($baseBorderRadius); } 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 { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; + @include border-top-right-radius($baseBorderRadius); } } @@ -145,12 +146,12 @@ // -------------- // 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; } } } @@ -222,6 +223,6 @@ background-color: darken($warningBackground, 5%); } &.info:hover td { background-color: darken($infoBackground, 5%); } -} \ No newline at end of file +}