2011-11-25 21:34:55 -08:00
|
|
|
//
|
|
|
|
// Tables.less
|
|
|
|
// Tables for, you guessed it, tabular data
|
|
|
|
// ----------------------------------------
|
2011-05-03 18:09:25 -07:00
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2012-01-20 21:16:40 +00:00
|
|
|
// BASE TABLES
|
|
|
|
// -----------------
|
|
|
|
|
|
|
|
table {
|
|
|
|
max-width: 100%;
|
2012-04-16 16:34:08 -07:00
|
|
|
background-color: @tableBackground;
|
2012-01-20 21:16:40 +00:00
|
|
|
border-collapse: collapse;
|
|
|
|
border-spacing: 0;
|
|
|
|
}
|
|
|
|
|
2011-08-16 22:58:01 -07:00
|
|
|
// BASELINE STYLES
|
|
|
|
// ---------------
|
2011-05-03 18:09:25 -07:00
|
|
|
|
2012-01-17 23:39:18 -08:00
|
|
|
.table {
|
2011-05-03 18:09:25 -07:00
|
|
|
width: 100%;
|
2011-10-31 19:37:10 -07:00
|
|
|
margin-bottom: @baseLineHeight;
|
2012-01-17 23:39:18 -08:00
|
|
|
// Cells
|
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: 8px;
|
|
|
|
line-height: @baseLineHeight;
|
|
|
|
text-align: left;
|
2012-02-10 23:07:32 -08:00
|
|
|
vertical-align: top;
|
2012-03-05 22:47:39 -08:00
|
|
|
border-top: 1px solid @tableBorder;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
|
|
|
th {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2012-02-10 23:07:32 -08:00
|
|
|
// Bottom align for column headings
|
|
|
|
thead th {
|
|
|
|
vertical-align: bottom;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
|
|
|
// Remove top border from thead by default
|
2012-03-22 21:08:41 -07:00
|
|
|
caption + thead tr:first-child th,
|
|
|
|
caption + thead tr:first-child td,
|
2012-03-11 18:18:18 -07:00
|
|
|
colgroup + thead tr:first-child th,
|
|
|
|
colgroup + thead tr:first-child td,
|
|
|
|
thead:first-child tr:first-child th,
|
|
|
|
thead:first-child tr:first-child td {
|
2012-01-17 23:39:18 -08:00
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
// Account for multiple tbody instances
|
|
|
|
tbody + tbody {
|
2012-03-05 22:47:39 -08:00
|
|
|
border-top: 2px solid @tableBorder;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
2012-01-11 09:43:13 -08:00
|
|
|
}
|
|
|
|
|
2011-10-31 19:37:10 -07:00
|
|
|
|
|
|
|
|
2011-11-29 22:35:03 -08:00
|
|
|
// CONDENSED TABLE W/ HALF PADDING
|
|
|
|
// -------------------------------
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-condensed {
|
2011-10-31 19:37:10 -07:00
|
|
|
th,
|
|
|
|
td {
|
2011-11-29 22:35:03 -08:00
|
|
|
padding: 4px 5px;
|
2011-09-08 10:47:05 -07:00
|
|
|
}
|
2011-10-31 19:37:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// BORDERED VERSION
|
|
|
|
// ----------------
|
|
|
|
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-bordered {
|
2012-03-05 22:47:39 -08:00
|
|
|
border: 1px solid @tableBorder;
|
2011-10-31 19:37:10 -07:00
|
|
|
border-collapse: separate; // Done so we can round those corners!
|
2012-01-26 17:32:11 -05:00
|
|
|
*border-collapse: collapsed; // IE7 can't round corners anyway
|
2012-04-16 16:34:08 -07:00
|
|
|
border-left: 0;
|
2011-10-31 19:37:10 -07:00
|
|
|
.border-radius(4px);
|
2012-02-21 23:00:02 -08:00
|
|
|
th,
|
|
|
|
td {
|
2012-03-05 22:47:39 -08:00
|
|
|
border-left: 1px solid @tableBorder;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2012-01-05 01:34:14 -08:00
|
|
|
// Prevent a double border
|
2012-03-23 01:28:04 -07:00
|
|
|
caption + thead tr:first-child th,
|
|
|
|
caption + tbody tr:first-child th,
|
|
|
|
caption + tbody tr:first-child td,
|
|
|
|
colgroup + thead tr:first-child th,
|
|
|
|
colgroup + tbody tr:first-child th,
|
|
|
|
colgroup + tbody tr:first-child td,
|
2012-01-05 01:34:14 -08:00
|
|
|
thead:first-child tr:first-child th,
|
2012-01-14 16:50:36 -08:00
|
|
|
tbody:first-child tr:first-child th,
|
2012-01-05 01:34:14 -08:00
|
|
|
tbody:first-child tr:first-child td {
|
2012-03-11 20:03:55 -07:00
|
|
|
border-top: 0;
|
2012-01-05 01:34:14 -08:00
|
|
|
}
|
2011-11-29 22:35:03 -08:00
|
|
|
// For first th or td in the first row in the first thead or tbody
|
2011-10-31 19:37:10 -07:00
|
|
|
thead:first-child tr:first-child th:first-child,
|
|
|
|
tbody:first-child tr:first-child td:first-child {
|
2012-04-14 13:31:48 -07:00
|
|
|
-webkit-border-top-left-radius: 4px;
|
|
|
|
border-top-left-radius: 4px;
|
2012-04-16 16:34:08 -07:00
|
|
|
-moz-border-radius-topleft: 4px;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2011-10-31 19:37:10 -07:00
|
|
|
thead:first-child tr:first-child th:last-child,
|
|
|
|
tbody:first-child tr:first-child td:last-child {
|
2012-04-14 13:31:48 -07:00
|
|
|
-webkit-border-top-right-radius: 4px;
|
|
|
|
border-top-right-radius: 4px;
|
2012-04-16 16:34:08 -07:00
|
|
|
-moz-border-radius-topright: 4px;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2011-11-29 22:35:03 -08:00
|
|
|
// 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 {
|
2011-09-08 23:01:28 -07:00
|
|
|
.border-radius(0 0 0 4px);
|
2012-04-14 13:31:48 -07:00
|
|
|
-webkit-border-bottom-left-radius: 4px;
|
|
|
|
border-bottom-left-radius: 4px;
|
2012-04-16 16:34:08 -07:00
|
|
|
-moz-border-radius-bottomleft: 4px;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2011-11-29 22:35:03 -08:00
|
|
|
thead:last-child tr:last-child th:last-child,
|
|
|
|
tbody:last-child tr:last-child td:last-child {
|
2012-04-14 13:31:48 -07:00
|
|
|
-webkit-border-bottom-right-radius: 4px;
|
|
|
|
border-bottom-right-radius: 4px;
|
2012-04-16 16:34:08 -07:00
|
|
|
-moz-border-radius-bottomright: 4px;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2011-05-03 18:09:25 -07:00
|
|
|
}
|
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2011-11-29 22:35:03 -08:00
|
|
|
// ZEBRA-STRIPING
|
|
|
|
// --------------
|
|
|
|
|
|
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-striped {
|
2011-11-29 22:35:03 -08:00
|
|
|
tbody {
|
|
|
|
tr:nth-child(odd) td,
|
|
|
|
tr:nth-child(odd) th {
|
2012-03-05 22:47:39 -08:00
|
|
|
background-color: @tableBackgroundAccent;
|
2011-11-29 22:35:03 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-02-05 02:28:42 -08:00
|
|
|
// HOVER EFFECT
|
|
|
|
// ------------
|
|
|
|
// Placed here since it has to come after the potential zebra striping
|
|
|
|
.table {
|
|
|
|
tbody tr:hover td,
|
|
|
|
tbody tr:hover th {
|
2012-03-05 22:47:39 -08:00
|
|
|
background-color: @tableBackgroundHover;
|
2012-02-05 02:28:42 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-29 22:35:03 -08:00
|
|
|
|
2012-01-07 04:34:30 -08:00
|
|
|
// TABLE CELL SIZING
|
|
|
|
// -----------------
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2012-01-07 04:34:30 -08:00
|
|
|
// Change the columns
|
2011-10-31 19:37:10 -07:00
|
|
|
table {
|
|
|
|
.span1 { .tableColumns(1); }
|
|
|
|
.span2 { .tableColumns(2); }
|
|
|
|
.span3 { .tableColumns(3); }
|
|
|
|
.span4 { .tableColumns(4); }
|
|
|
|
.span5 { .tableColumns(5); }
|
|
|
|
.span6 { .tableColumns(6); }
|
|
|
|
.span7 { .tableColumns(7); }
|
|
|
|
.span8 { .tableColumns(8); }
|
|
|
|
.span9 { .tableColumns(9); }
|
|
|
|
.span10 { .tableColumns(10); }
|
|
|
|
.span11 { .tableColumns(11); }
|
|
|
|
.span12 { .tableColumns(12); }
|
2012-02-21 19:07:55 +01:00
|
|
|
.span13 { .tableColumns(13); }
|
|
|
|
.span14 { .tableColumns(14); }
|
|
|
|
.span15 { .tableColumns(15); }
|
|
|
|
.span16 { .tableColumns(16); }
|
|
|
|
.span17 { .tableColumns(17); }
|
|
|
|
.span18 { .tableColumns(18); }
|
|
|
|
.span19 { .tableColumns(19); }
|
|
|
|
.span20 { .tableColumns(20); }
|
|
|
|
.span21 { .tableColumns(21); }
|
|
|
|
.span22 { .tableColumns(22); }
|
|
|
|
.span23 { .tableColumns(23); }
|
|
|
|
.span24 { .tableColumns(24); }
|
2011-10-31 19:37:10 -07:00
|
|
|
}
|