aboutsummaryrefslogtreecommitdiff
path: root/lib/tables.less
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-11-30 22:05:49 -0800
committerJacob Thornton <[email protected]>2011-11-30 22:05:49 -0800
commitb1cba98aab5ee2d0576bbbbb92ba3488516290eb (patch)
treecb938e0ba8f666ffbd8e6436b8e3b4fb1490adc4 /lib/tables.less
parentdc628c9115b74e49940c0cc200a8914232c9d2a2 (diff)
parentbc51c15709469fd0c2e78886a15e849626a8f191 (diff)
downloadbootstrap-b1cba98aab5ee2d0576bbbbb92ba3488516290eb.tar.xz
bootstrap-b1cba98aab5ee2d0576bbbbb92ba3488516290eb.zip
Merge branch '2.0-wip' of https://github.com/twitter/bootstrap into 2.0-wip
Conflicts: bootstrap.css
Diffstat (limited to 'lib/tables.less')
-rw-r--r--lib/tables.less96
1 files changed, 47 insertions, 49 deletions
diff --git a/lib/tables.less b/lib/tables.less
index 22a319918..524f959f0 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
+}*/