0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

fix prettyify and update the table styles to include a condensed flavor

This commit is contained in:
Mark Otto 2011-10-26 21:22:05 -07:00
parent 41ada302ec
commit 5736ba549c
5 changed files with 52 additions and 5 deletions

5
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: Thu Oct 20 09:12:21 PDT 2011 * Date: Wed Oct 26 21:19:44 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).
@ -1094,6 +1094,9 @@ table tbody th {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
vertical-align: top; vertical-align: top;
} }
.condensed-table th, .condensed-table td {
padding: 5px 5px 4px;
}
.bordered-table { .bordered-table {
border: 1px solid #ddd; border: 1px solid #ddd;
border-collapse: separate; border-collapse: separate;

1
bootstrap.min.css vendored
View File

@ -188,6 +188,7 @@ table{width:100%;margin-bottom:18px;padding:0;font-size:13px;border-collapse:col
table th{padding-top:9px;font-weight:bold;vertical-align:middle;} table th{padding-top:9px;font-weight:bold;vertical-align:middle;}
table td{vertical-align:top;border-top:1px solid #ddd;} table td{vertical-align:top;border-top:1px solid #ddd;}
table tbody th{border-top:1px solid #ddd;vertical-align:top;} table tbody th{border-top:1px solid #ddd;vertical-align:top;}
.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;} .bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
.bordered-table thead tr:first-child th:first-child,.bordered-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;} .bordered-table thead tr:first-child th:first-child,.bordered-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;}
.bordered-table thead tr:first-child th:last-child,.bordered-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;} .bordered-table thead tr:first-child th:last-child,.bordered-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;}

View File

@ -16,12 +16,11 @@
} }
/* Specify class=linenums on a pre to get line numbering */ /* Specify class=linenums on a pre to get line numbering */
.linenums { ol.linenums {
margin: 0 0 0 40px; margin: 0 0 0 40px;
} }
/* IE indents via margin-left */ /* IE indents via margin-left */
.linenums li { ol.linenums li {
margin-left: -5px;
padding: 0 5px; padding: 0 5px;
color: rgba(0,0,0,.15); color: rgba(0,0,0,.15);
line-height: 20px; line-height: 20px;

View File

@ -865,6 +865,39 @@
<table> <table>
... ...
&lt;/table&gt;</pre> &lt;/table&gt;</pre>
<h3>Example: Condensed table</h3>
<p>For tables that require more data in tighter spaces, use the condensed flavor that cuts padding in half. It can also be used in conjunction with borders and zebra-stripes, just like the default table styles.</p>
<table class="condensed-table">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Language</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>Some</td>
<td>One</td>
<td>English</td>
</tr>
<tr>
<th>2</th>
<td>Joe</td>
<td>Sixpack</td>
<td>English</td>
</tr>
<tr>
<th>3</th>
<td>Stu</td>
<td>Dent</td>
<td>Code</td>
</tr>
</tbody>
</table>
<h3>Example: Bordered table</h3> <h3>Example: Bordered table</h3>
<p>Make your tables look just a wee bit sleeker by rounding their corners and adding borders on all sides.</p> <p>Make your tables look just a wee bit sleeker by rounding their corners and adding borders on all sides.</p>
<table class="bordered-table"> <table class="bordered-table">

View File

@ -13,7 +13,8 @@ table {
padding: 0; padding: 0;
font-size: @basefont; font-size: @basefont;
border-collapse: collapse; border-collapse: collapse;
th, td { th,
td {
padding: 10px 10px 9px; padding: 10px 10px 9px;
line-height: @baseline; line-height: @baseline;
text-align: left; text-align: left;
@ -35,6 +36,16 @@ table {
} }
// CONDENSED VERSION
// -----------------
.condensed-table {
th,
td {
padding: 5px 5px 4px;
}
}
// BORDERED VERSION // BORDERED VERSION
// ---------------- // ----------------