aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2011-11-29 22:35:03 -0800
committerMark Otto <[email protected]>2011-11-29 22:35:03 -0800
commitb36df463108e2e4df8c389a06f577823564788d9 (patch)
tree69b347586acef5b27ceb73abacaa13d26b75cd8c /lib
parentecc9764c831078a186fed69c3ae0af2f7c9ee495 (diff)
downloadbootstrap-b36df463108e2e4df8c389a06f577823564788d9.tar.xz
bootstrap-b36df463108e2e4df8c389a06f577823564788d9.zip
misc docs updates, revamped tables CSS save for grid columns and tablesorter options
Diffstat (limited to 'lib')
-rw-r--r--lib/tables.less96
1 files changed, 47 insertions, 49 deletions
diff --git a/lib/tables.less b/lib/tables.less
index 4aed466b1..c8cda1cf9 100644
--- a/lib/tables.less
+++ b/lib/tables.less
@@ -4,45 +4,41 @@
* ---------------------------------------- */
+
// BASELINE STYLES
// ---------------
table {
width: 100%;
- padding: 0;
margin-bottom: @baseLineHeight;
- font-size: @baseFontSize;
- border-collapse: collapse;
- th,
- td {
- padding: 10px 10px 9px;
- line-height: @baseLineHeight;
- text-align: left;
- }
- th {
- padding-top: 9px;
- font-weight: bold;
- vertical-align: middle;
- }
- td {
- vertical-align: top;
- border-top: 1px solid #ddd;
- }
- // When scoped to row, fix th in tbody
- tbody th {
- border-top: 1px solid #ddd;
- vertical-align: top;
- }
+}
+th,
+td {
+ padding: 8px;
+ line-height: @baseLineHeight;
+ text-align: left;
+ border-bottom: 1px solid #ddd;
+}
+th {
+ font-weight: bold;
+ vertical-align: bottom;
+}
+td {
+ vertical-align: top;
+}
+tbody tr:last-child th,
+tbody tr:last-child td {
+ border-bottom: 0;
}
-// CONDENSED VERSION
-// -----------------
+// CONDENSED TABLE W/ HALF PADDING
+// -------------------------------
.condensed-table {
th,
td {
- padding: 5px 5px 4px;
+ padding: 4px 5px;
}
}
@@ -53,13 +49,14 @@ table {
.bordered-table {
border: 1px solid #ddd;
border-collapse: separate; // Done so we can round those corners!
- *border-collapse: collapse; /* IE7, collapse table to remove spacing */
.border-radius(4px);
th + th,
td + td,
- th + td {
+ th + td,
+ td + th {
border-left: 1px solid #ddd;
}
+ // 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 {
.border-radius(4px 0 0 0);
@@ -68,15 +65,34 @@ table {
tbody:first-child tr:first-child td:last-child {
.border-radius(0 4px 0 0);
}
- tbody tr:last-child td:first-child {
+ // For first th or td in the first row in the first thead or tbody
+ thead:last-child tr:last-child th:first-child,
+ tbody:last-child tr:last-child td:first-child {
.border-radius(0 0 0 4px);
}
- tbody tr:last-child td:last-child {
+ thead:last-child tr:last-child th:last-child,
+ tbody:last-child tr:last-child td:last-child {
.border-radius(0 0 4px 0);
}
}
+// ZEBRA-STRIPING
+// --------------
+
+// Default zebra-stripe styles (alternating gray and transparent backgrounds)
+.striped-table {
+ tbody {
+ tr:nth-child(odd) td,
+ tr:nth-child(odd) th {
+ background-color: #f9f9f9;
+ }
+ }
+}
+
+
+
+/*
// ----------------
// This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border
@@ -104,24 +120,6 @@ table {
}
-// ZEBRA-STRIPING
-// --------------
-
-// Default zebra-stripe styles (alternating gray and transparent backgrounds)
-.striped-table {
- tbody {
- tr:nth-child(odd) td,
- tr:nth-child(odd) th {
- background-color: #f9f9f9;
- }
- tr:hover td,
- tr:hover th {
- background-color: #f5f5f5;
- }
- }
-}
-
-
// TABLESORTER
// -----------
@@ -225,4 +223,4 @@ table {
.headerSortDown.purple {
background-color: lighten(@purple, 40%);
}
-} \ No newline at end of file
+}*/ \ No newline at end of file