Commit cacc2137 authored by Mark Otto's avatar Mark Otto

Nesting tables

* Add simple test to css-tests.html
* Scope .table-bordered to immediate children th/td elements only
parent b9292ff9
......@@ -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;
......
This diff is collapsed.
......@@ -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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment