mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Nesting tables
* Add simple test to css-tests.html * Scope .table-bordered to immediate children th/td elements only
This commit is contained in:
parent
b9292ff90c
commit
cacc213762
4 changed files with 70 additions and 38 deletions
20
docs/assets/css/bootstrap.css
vendored
20
docs/assets/css/bootstrap.css
vendored
|
@ -2044,31 +2044,31 @@ table {
|
|||
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 thead:first-child tr:first-child > th:first-child,
|
||||
.table-bordered 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;
|
||||
}
|
||||
|
||||
.table-bordered thead:first-child tr:first-child th:last-child,
|
||||
.table-bordered tbody:first-child tr:first-child td:last-child {
|
||||
.table-bordered thead:first-child tr:first-child > th:last-child,
|
||||
.table-bordered 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;
|
||||
}
|
||||
|
||||
.table-bordered thead:last-child tr:last-child th:first-child,
|
||||
.table-bordered tbody:last-child tr:last-child td:first-child,
|
||||
.table-bordered tfoot:last-child tr:last-child td: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 tfoot:last-child tr:last-child > td:first-child {
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
-moz-border-radius-bottomleft: 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 tfoot:last-child tr:last-child td: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 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;
|
||||
|
|
19
docs/assets/js/bootstrap.min.js
vendored
19
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue