0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

resolve problem with nested tables having double borders

This commit is contained in:
Mark Otto 2011-10-07 23:53:32 -07:00
parent d74dee5e0f
commit 9991f3faa1
5 changed files with 59 additions and 5 deletions

7
bootstrap.css vendored
View File

@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Tue Oct 4 01:16:04 PDT 2011 * Date: Fri Oct 7 23:53:08 PDT 2011
*/ */
/* Reset.less /* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
@ -1083,9 +1083,12 @@ table td {
table th + th, table td + td { table th + th, table td + td {
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
table tr + tr td { table tr td {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
table tr:first-child td {
border-top: 0;
}
table tbody tr:first-child td:first-child { table tbody tr:first-child td:first-child {
-webkit-border-radius: 4px 0 0 0; -webkit-border-radius: 4px 0 0 0;
-moz-border-radius: 4px 0 0 0; -moz-border-radius: 4px 0 0 0;

3
bootstrap.min.css vendored
View File

@ -184,7 +184,8 @@ table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-c
table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;} table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;}
table td{vertical-align:top;} table td{vertical-align:top;}
table th+th,table td+td{border-left:1px solid #ddd;} table th+th,table td+td{border-left:1px solid #ddd;}
table tr+tr td{border-top:1px solid #ddd;} table tr td{border-top:1px solid #ddd;}
table tr:first-child td{border-top:0;}
table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}

View File

@ -869,6 +869,53 @@
<td>Dent</td> <td>Dent</td>
<td>Code</td> <td>Code</td>
</tr> </tr>
<tr>
<td colspan="4">
span 4 columns
</td>
</tr>
<tr>
<td colspan="2">
span 2 columns
</td>
<td colspan="2">
span 2 columns
</td>
</tr>
<tr>
<td colspan="2">
<table>
<thead>
<tr>
<th>1</th>
<th>2</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
</td>
<td colspan="2">
<table>
<thead>
<tr>
<th>1</th>
<th>2</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody> </tbody>
</table> </table>
<pre class="prettyprint linenums"> <pre class="prettyprint linenums">

View File

@ -77,7 +77,7 @@ a {
.row { .row {
.clearfix(); .clearfix();
margin-left: -1 * @gridGutterWidth; margin-left: -@gridGutterWidth;
} }
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7) // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)

View File

@ -34,9 +34,12 @@ table {
td + td { td + td {
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
tr + tr td { tr td {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
tr:first-child td {
border-top: 0;
}
tbody tr:first-child td:first-child { tbody tr:first-child td:first-child {
.border-radius(4px 0 0 0); .border-radius(4px 0 0 0);
} }