2011-11-26 05:34:55 +00:00
|
|
|
//
|
2012-06-29 04:46:45 +00:00
|
|
|
// Tables
|
|
|
|
// --------------------------------------------------
|
2011-05-04 01:09:25 +00:00
|
|
|
|
2011-06-30 07:15:37 +00:00
|
|
|
|
2012-01-20 21:16:40 +00:00
|
|
|
// BASE TABLES
|
|
|
|
// -----------------
|
|
|
|
|
|
|
|
table {
|
|
|
|
max-width: 100%;
|
2012-04-16 23:34:08 +00:00
|
|
|
background-color: @tableBackground;
|
2012-01-20 21:16:40 +00:00
|
|
|
border-collapse: collapse;
|
|
|
|
border-spacing: 0;
|
|
|
|
}
|
|
|
|
|
2011-08-17 05:58:01 +00:00
|
|
|
// BASELINE STYLES
|
|
|
|
// ---------------
|
2011-05-04 01:09:25 +00:00
|
|
|
|
2012-01-18 07:39:18 +00:00
|
|
|
.table {
|
2011-05-04 01:09:25 +00:00
|
|
|
width: 100%;
|
2011-11-01 02:37:10 +00:00
|
|
|
margin-bottom: @baseLineHeight;
|
2012-01-18 07:39:18 +00:00
|
|
|
// Cells
|
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: 8px;
|
|
|
|
line-height: @baseLineHeight;
|
|
|
|
text-align: left;
|
2012-02-11 07:07:32 +00:00
|
|
|
vertical-align: top;
|
2012-03-06 06:47:39 +00:00
|
|
|
border-top: 1px solid @tableBorder;
|
2012-01-18 07:39:18 +00:00
|
|
|
}
|
|
|
|
th {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2012-02-11 07:07:32 +00:00
|
|
|
// Bottom align for column headings
|
|
|
|
thead th {
|
|
|
|
vertical-align: bottom;
|
2012-01-18 07:39:18 +00:00
|
|
|
}
|
|
|
|
// Remove top border from thead by default
|
2012-03-23 04:08:41 +00:00
|
|
|
caption + thead tr:first-child th,
|
|
|
|
caption + thead tr:first-child td,
|
2012-03-12 01:18:18 +00: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-18 07:39:18 +00:00
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
// Account for multiple tbody instances
|
|
|
|
tbody + tbody {
|
2012-03-06 06:47:39 +00:00
|
|
|
border-top: 2px solid @tableBorder;
|
2012-01-18 07:39:18 +00:00
|
|
|
}
|
2012-01-11 17:43:13 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 02:37:10 +00:00
|
|
|
|
|
|
|
|
2011-11-30 06:35:03 +00:00
|
|
|
// CONDENSED TABLE W/ HALF PADDING
|
|
|
|
// -------------------------------
|
2011-11-01 02:37:10 +00:00
|
|
|
|
2012-01-15 05:28:47 +00:00
|
|
|
.table-condensed {
|
2011-11-01 02:37:10 +00:00
|
|
|
th,
|
|
|
|
td {
|
2011-11-30 06:35:03 +00:00
|
|
|
padding: 4px 5px;
|
2011-09-08 17:47:05 +00:00
|
|
|
}
|
2011-11-01 02:37:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// BORDERED VERSION
|
|
|
|
// ----------------
|
|
|
|
|
2012-01-15 05:28:47 +00:00
|
|
|
.table-bordered {
|
2012-03-06 06:47:39 +00:00
|
|
|
border: 1px solid @tableBorder;
|
2011-11-01 02:37:10 +00:00
|
|
|
border-collapse: separate; // Done so we can round those corners!
|
2012-07-30 06:51:40 +00:00
|
|
|
*border-collapse: collapse; // IE7 can't round corners anyway
|
2012-04-16 23:34:08 +00:00
|
|
|
border-left: 0;
|
2012-10-03 16:26:52 +00:00
|
|
|
.border-radius(@baseBorderRadius);
|
2012-02-22 07:00:02 +00:00
|
|
|
th,
|
|
|
|
td {
|
2012-03-06 06:47:39 +00:00
|
|
|
border-left: 1px solid @tableBorder;
|
2011-09-09 06:01:28 +00:00
|
|
|
}
|
2012-01-05 09:34:14 +00:00
|
|
|
// Prevent a double border
|
2012-03-23 08:28:04 +00: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 09:34:14 +00:00
|
|
|
thead:first-child tr:first-child th,
|
2012-01-15 00:50:36 +00:00
|
|
|
tbody:first-child tr:first-child th,
|
2012-01-05 09:34:14 +00:00
|
|
|
tbody:first-child tr:first-child td {
|
2012-03-12 03:03:55 +00:00
|
|
|
border-top: 0;
|
2012-01-05 09:34:14 +00:00
|
|
|
}
|
2011-11-30 06:35:03 +00:00
|
|
|
// For first th or td in the first row in the first thead or tbody
|
2011-11-01 02:37:10 +00:00
|
|
|
thead:first-child tr:first-child th:first-child,
|
|
|
|
tbody:first-child tr:first-child td:first-child {
|
2012-04-14 20:31:48 +00:00
|
|
|
-webkit-border-top-left-radius: 4px;
|
|
|
|
border-top-left-radius: 4px;
|
2012-04-16 23:34:08 +00:00
|
|
|
-moz-border-radius-topleft: 4px;
|
2011-09-09 06:01:28 +00:00
|
|
|
}
|
2011-11-01 02:37:10 +00:00
|
|
|
thead:first-child tr:first-child th:last-child,
|
|
|
|
tbody:first-child tr:first-child td:last-child {
|
2012-04-14 20:31:48 +00:00
|
|
|
-webkit-border-top-right-radius: 4px;
|
|
|
|
border-top-right-radius: 4px;
|
2012-04-16 23:34:08 +00:00
|
|
|
-moz-border-radius-topright: 4px;
|
2011-09-09 06:01:28 +00:00
|
|
|
}
|
2011-11-30 06:35:03 +00: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,
|
2012-07-20 04:25:24 +00:00
|
|
|
tbody:last-child tr:last-child td:first-child,
|
|
|
|
tfoot:last-child tr:last-child td:first-child {
|
2011-09-09 06:01:28 +00:00
|
|
|
.border-radius(0 0 0 4px);
|
2012-04-14 20:31:48 +00:00
|
|
|
-webkit-border-bottom-left-radius: 4px;
|
|
|
|
border-bottom-left-radius: 4px;
|
2012-04-16 23:34:08 +00:00
|
|
|
-moz-border-radius-bottomleft: 4px;
|
2011-09-09 06:01:28 +00:00
|
|
|
}
|
2011-11-30 06:35:03 +00:00
|
|
|
thead:last-child tr:last-child th:last-child,
|
2012-07-20 04:25:24 +00:00
|
|
|
tbody:last-child tr:last-child td:last-child,
|
|
|
|
tfoot:last-child tr:last-child td:last-child {
|
2012-04-14 20:31:48 +00:00
|
|
|
-webkit-border-bottom-right-radius: 4px;
|
|
|
|
border-bottom-right-radius: 4px;
|
2012-04-16 23:34:08 +00:00
|
|
|
-moz-border-radius-bottomright: 4px;
|
2011-09-09 06:01:28 +00:00
|
|
|
}
|
2012-07-20 04:06:42 +00:00
|
|
|
|
2012-07-20 04:25:24 +00:00
|
|
|
// Special fixes to round the left border on the first td/th
|
2012-07-20 04:06:42 +00:00
|
|
|
caption + thead tr:first-child th:first-child,
|
|
|
|
caption + tbody tr:first-child td:first-child,
|
|
|
|
colgroup + thead tr:first-child th:first-child,
|
|
|
|
colgroup + tbody tr:first-child td:first-child {
|
|
|
|
-webkit-border-top-left-radius: 4px;
|
|
|
|
border-top-left-radius: 4px;
|
|
|
|
-moz-border-radius-topleft: 4px;
|
|
|
|
}
|
|
|
|
caption + thead tr:first-child th:last-child,
|
|
|
|
caption + tbody tr:first-child td:last-child,
|
|
|
|
colgroup + thead tr:first-child th:last-child,
|
|
|
|
colgroup + tbody tr:first-child td:last-child {
|
|
|
|
-webkit-border-top-right-radius: 4px;
|
|
|
|
border-top-right-radius: 4px;
|
2012-09-05 17:05:54 +00:00
|
|
|
-moz-border-radius-topright: 4px;
|
2012-07-20 04:06:42 +00:00
|
|
|
}
|
2012-07-20 04:25:24 +00:00
|
|
|
|
2011-05-04 01:09:25 +00:00
|
|
|
}
|
|
|
|
|
2011-06-30 07:15:37 +00:00
|
|
|
|
2012-07-20 04:06:42 +00:00
|
|
|
|
|
|
|
|
2011-11-30 06:35:03 +00:00
|
|
|
// ZEBRA-STRIPING
|
|
|
|
// --------------
|
|
|
|
|
|
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
2012-01-15 05:28:47 +00:00
|
|
|
.table-striped {
|
2011-11-30 06:35:03 +00:00
|
|
|
tbody {
|
|
|
|
tr:nth-child(odd) td,
|
|
|
|
tr:nth-child(odd) th {
|
2012-03-06 06:47:39 +00:00
|
|
|
background-color: @tableBackgroundAccent;
|
2011-11-30 06:35:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-02-05 10:28:42 +00:00
|
|
|
// HOVER EFFECT
|
|
|
|
// ------------
|
|
|
|
// Placed here since it has to come after the potential zebra striping
|
2012-06-25 21:11:37 +00:00
|
|
|
.table-hover {
|
2012-08-14 21:51:33 +00:00
|
|
|
tbody {
|
|
|
|
tr:hover td,
|
|
|
|
tr:hover th {
|
|
|
|
background-color: @tableBackgroundHover;
|
|
|
|
}
|
2012-02-05 10:28:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-30 06:35:03 +00:00
|
|
|
|
2012-01-07 12:34:30 +00:00
|
|
|
// TABLE CELL SIZING
|
|
|
|
// -----------------
|
2011-11-01 02:37:10 +00:00
|
|
|
|
2012-06-25 21:37:35 +00:00
|
|
|
// Reset default grid behavior
|
2012-10-03 16:43:14 +00:00
|
|
|
table td[class*="span"],
|
|
|
|
table th[class*="span"],
|
|
|
|
.row-fluid table td[class*="span"],
|
|
|
|
.row-fluid table th[class*="span"] {
|
2012-06-25 21:37:35 +00:00
|
|
|
display: table-cell;
|
|
|
|
float: none; // undo default grid column styles
|
|
|
|
margin-left: 0; // undo default grid column styles
|
|
|
|
}
|
|
|
|
|
|
|
|
// Change the column widths to account for td/th padding
|
2012-10-01 20:08:21 +00:00
|
|
|
.table td,
|
|
|
|
.table th {
|
|
|
|
&.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); }
|
2011-11-01 02:37:10 +00:00
|
|
|
}
|
2012-08-08 05:50:49 +00:00
|
|
|
|
|
|
|
|
2012-08-28 04:06:21 +00:00
|
|
|
|
2012-08-08 05:50:49 +00:00
|
|
|
// TABLE BACKGROUNDS
|
|
|
|
// -----------------
|
|
|
|
// Exact selectors below required to override .table-striped
|
|
|
|
|
2012-08-28 04:06:21 +00:00
|
|
|
.table tbody tr {
|
|
|
|
&.success td {
|
2012-08-08 05:50:49 +00:00
|
|
|
background-color: @successBackground;
|
|
|
|
}
|
2012-08-28 04:06:21 +00:00
|
|
|
&.error td {
|
2012-08-08 05:50:49 +00:00
|
|
|
background-color: @errorBackground;
|
|
|
|
}
|
2012-08-28 04:06:21 +00:00
|
|
|
&.warning td {
|
2012-08-22 09:20:31 +00:00
|
|
|
background-color: @warningBackground;
|
|
|
|
}
|
2012-08-28 04:06:21 +00:00
|
|
|
&.info td {
|
2012-08-08 05:50:49 +00:00
|
|
|
background-color: @infoBackground;
|
|
|
|
}
|
|
|
|
}
|
2012-08-28 04:06:21 +00:00
|
|
|
|
|
|
|
// Hover states for .table-hover
|
|
|
|
.table-hover tbody tr {
|
|
|
|
&.success:hover td {
|
|
|
|
background-color: darken(@successBackground, 5%);
|
|
|
|
}
|
|
|
|
&.error:hover td {
|
|
|
|
background-color: darken(@errorBackground, 5%);
|
|
|
|
}
|
|
|
|
&.warning:hover td {
|
|
|
|
background-color: darken(@warningBackground, 5%);
|
|
|
|
}
|
|
|
|
&.info:hover td {
|
|
|
|
background-color: darken(@infoBackground, 5%);
|
|
|
|
}
|
|
|
|
}
|