diff options
author | Mark Otto <otto@github.com> | 2012-12-09 00:52:19 +0400 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2012-12-09 00:52:19 +0400 |
commit | cacc2137620675f81ab8895c2988778d12f92596 (patch) | |
tree | 89e0b532a61eaad0f4b90aba3e270b9a4cc292bc /less | |
parent | b9292ff90ca90e2df70744d33195993fddf39b3d (diff) |
Nesting tables
* Add simple test to css-tests.html
* Scope .table-bordered to immediate children th/td elements only
Diffstat (limited to 'less')
-rw-r--r-- | less/tables.less | 20 | ||||
-rw-r--r-- | less/tests/css-tests.html | 49 |
2 files changed, 59 insertions, 10 deletions
diff --git a/less/tables.less b/less/tables.less index d73b581803..b816e7c2d2 100644 --- a/less/tables.less +++ b/less/tables.less @@ -89,23 +89,23 @@ table { 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 { + thead:first-child tr:first-child > th:first-child, + tbody:first-child tr:first-child > td:first-child { .border-top-left-radius(@baseBorderRadius); } - thead:first-child tr:first-child th:last-child, - tbody:first-child tr:first-child td:last-child { + thead:first-child tr:first-child > th:last-child, + tbody:first-child tr:first-child > td:last-child { .border-top-right-radius(@baseBorderRadius); } // 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 { + 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 { .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 { + 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 { .border-bottom-right-radius(@baseBorderRadius); } diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 70b8904b37..035ba8bd44 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -593,6 +593,55 @@ </div> </div><!--/row--> +<h4>Nesting and striping</h4> +<table class="table table-bordered table-striped"> + <thead> + <tr> + <th>Test</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th>Test</th> + <th>Test</th> + </tr> + </thead> + <tbody> + <tr> + <td> + test + </td> + <td> + test + </td> + </tr> + <tr> + <td> + test + </td> + <td> + test + </td> + </tr> + <tr> + <td> + test + </td> + <td> + test + </td> + </tr> + </tbody> + </table> + </td> + </tr> + </tbody> +</table> + <h4>Fluid grid sizing</h4> <div class="row-fluid"> <div class="span12"> |