diff options
Diffstat (limited to 'less')
| -rw-r--r-- | less/buttons.less | 4 | ||||
| -rw-r--r-- | less/code.less | 2 | ||||
| -rw-r--r-- | less/tables.less | 34 | ||||
| -rw-r--r-- | less/tests/css-tests.html | 49 |
4 files changed, 73 insertions, 16 deletions
diff --git a/less/buttons.less b/less/buttons.less index a50b77cdf..92c9477aa 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -74,6 +74,10 @@ font-size: @font-size-small; border-radius: @border-radius-small; } +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} // Mini .btn-mini { diff --git a/less/code.less b/less/code.less index fb229d684..cf884cb83 100644 --- a/less/code.less +++ b/less/code.less @@ -47,6 +47,8 @@ pre { code { padding: 0; color: inherit; + white-space: pre; + white-space: pre-wrap; background-color: transparent; border: 0; } diff --git a/less/tables.less b/less/tables.less index 98e800106..3fe3d6d96 100644 --- a/less/tables.less +++ b/less/tables.less @@ -47,6 +47,11 @@ table { tbody + tbody { border-top: 2px solid @table-border; } + + // Nesting + .table { + background-color: @body-background; + } } @@ -88,35 +93,34 @@ 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: @border-radius-base; } - 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: @border-radius-base; } // 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: @border-radius-base; } - 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: @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, @@ -141,8 +145,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: @table-background-accent; } } diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 7af759f48..9a5fd589d 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -467,7 +467,54 @@ </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> <!-- Forms |
