Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <otto@github.com>2012-12-09 05:40:42 +0400
committerMark Otto <otto@github.com>2012-12-09 05:40:42 +0400
commitbc0b94a3fdc8fe480c74f4494073e2c0addb265e (patch)
treee13fec2ed829b4586fa4044fffc8dbfadddae54e /less
parentbe5f31480b53555c492e0077c8bb9f419fc48f62 (diff)
parent9376a7c221a64c2bf508d02ea2ccd85748d10fcc (diff)
Merge branch 'master' into 3.0.0-wip
Conflicts: docs/assets/css/bootstrap.css docs/assets/js/bootstrap.js docs/css.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/javascript.mustache less/breadcrumbs.less less/tables.less less/tests/css-tests.html
Diffstat (limited to 'less')
-rw-r--r--less/buttons.less4
-rw-r--r--less/code.less2
-rw-r--r--less/tables.less34
-rw-r--r--less/tests/css-tests.html49
4 files changed, 73 insertions, 16 deletions
diff --git a/less/buttons.less b/less/buttons.less
index a50b77cdfe..92c9477aad 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 fb229d6847..cf884cb83a 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 98e800106f..3fe3d6d969 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 7af759f48d..9a5fd589d8 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