2011-11-25 21:34:55 -08:00
|
|
|
//
|
2012-06-28 21:46:45 -07:00
|
|
|
// Tables
|
|
|
|
// --------------------------------------------------
|
2011-05-03 18:09:25 -07:00
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2012-01-20 21:16:40 +00:00
|
|
|
table {
|
|
|
|
max-width: 100%;
|
2012-11-30 15:05:23 -08:00
|
|
|
background-color: @table-background;
|
2012-01-20 21:16:40 +00:00
|
|
|
border-collapse: collapse;
|
|
|
|
border-spacing: 0;
|
|
|
|
}
|
|
|
|
|
2012-09-30 23:59:35 -07:00
|
|
|
|
|
|
|
|
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%;
|
2012-11-30 14:45:25 -08:00
|
|
|
margin-bottom: @line-height-base;
|
2012-01-17 23:39:18 -08:00
|
|
|
// Cells
|
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: 8px;
|
2012-11-30 14:45:25 -08:00
|
|
|
line-height: @line-height-base;
|
2012-01-17 23:39:18 -08:00
|
|
|
text-align: left;
|
2012-02-10 23:07:32 -08:00
|
|
|
vertical-align: top;
|
2012-11-30 15:05:23 -08:00
|
|
|
border-top: 1px solid @table-border;
|
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-11-30 15:05:23 -08:00
|
|
|
border-top: 2px solid @table-border;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
2012-12-08 12:57:21 -08:00
|
|
|
|
|
|
|
// Nesting
|
|
|
|
.table {
|
2012-12-08 17:40:42 -08:00
|
|
|
background-color: @body-background;
|
2012-12-08 12:57:21 -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
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-09-30 23:59:35 -07:00
|
|
|
|
2011-10-31 19:37:10 -07:00
|
|
|
// BORDERED VERSION
|
|
|
|
// ----------------
|
|
|
|
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-bordered {
|
2012-11-30 15:05:23 -08:00
|
|
|
border: 1px solid @table-border;
|
2011-10-31 19:37:10 -07:00
|
|
|
border-collapse: separate; // Done so we can round those corners!
|
2012-04-16 16:34:08 -07:00
|
|
|
border-left: 0;
|
2012-11-30 14:45:25 -08:00
|
|
|
border-radius: @border-radius-base;
|
2012-02-21 23:00:02 -08:00
|
|
|
th,
|
|
|
|
td {
|
2012-11-30 15:05:23 -08:00
|
|
|
border-left: 1px solid @table-border;
|
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
|
2012-12-08 12:52:19 -08:00
|
|
|
thead:first-child tr:first-child > th:first-child,
|
|
|
|
tbody:first-child tr:first-child > td:first-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-top-left-radius: @border-radius-base;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2012-12-08 12:52:19 -08:00
|
|
|
thead:first-child tr:first-child > th:last-child,
|
|
|
|
tbody:first-child tr:first-child > td:last-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-top-right-radius: @border-radius-base;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2012-11-13 17:49:33 +07:00
|
|
|
// For first th or td in the last row in the last thead or tbody
|
2012-12-08 12:52:19 -08:00
|
|
|
thead:last-child tr:last-child > th:first-child,
|
|
|
|
tbody:last-child tr:last-child > td:first-child,
|
|
|
|
tfoot:last-child tr:last-child > td:first-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-bottom-left-radius: @border-radius-base;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2012-12-08 12:52:19 -08:00
|
|
|
thead:last-child tr:last-child > th:last-child,
|
|
|
|
tbody:last-child tr:last-child > td:last-child,
|
|
|
|
tfoot:last-child tr:last-child > td:last-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-bottom-right-radius: @border-radius-base;
|
2012-11-13 17:49:33 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
|
2012-12-08 17:40:42 -08:00
|
|
|
tfoot + tbody:last-child tr:last-child > td:first-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-bottom-left-radius: 0;
|
2011-09-08 23:01:28 -07:00
|
|
|
}
|
2012-12-08 17:40:42 -08:00
|
|
|
tfoot + tbody:last-child tr:last-child > td:last-child {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-bottom-right-radius: 0;
|
2012-11-13 17:49:33 +07:00
|
|
|
}
|
|
|
|
|
2012-07-19 21:25:24 -07:00
|
|
|
// Special fixes to round the left border on the first td/th
|
2012-07-19 21:06:42 -07: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 {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-top-left-radius: @border-radius-base;
|
2012-07-19 21:06:42 -07:00
|
|
|
}
|
|
|
|
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 {
|
2012-12-01 14:25:28 -08:00
|
|
|
border-top-right-radius: @border-radius-base;
|
2012-07-19 21:06:42 -07:00
|
|
|
}
|
2012-07-19 21:25:24 -07:00
|
|
|
|
2011-05-03 18:09:25 -07:00
|
|
|
}
|
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2012-07-19 21:06:42 -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 {
|
2012-12-08 12:57:21 -08:00
|
|
|
> tr:nth-child(odd) > td,
|
|
|
|
> tr:nth-child(odd) > th {
|
2012-11-30 15:05:23 -08:00
|
|
|
background-color: @table-background-accent;
|
2011-11-29 22:35:03 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-09-30 23:59:35 -07:00
|
|
|
|
2012-02-05 02:28:42 -08:00
|
|
|
// HOVER EFFECT
|
|
|
|
// ------------
|
|
|
|
// Placed here since it has to come after the potential zebra striping
|
2012-06-25 14:11:37 -07:00
|
|
|
.table-hover {
|
2012-08-14 14:51:33 -07:00
|
|
|
tbody {
|
|
|
|
tr:hover td,
|
|
|
|
tr:hover th {
|
2012-11-30 15:05:23 -08:00
|
|
|
background-color: @table-background-hover;
|
2012-08-14 14:51:33 -07:00
|
|
|
}
|
2012-02-05 02:28:42 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-29 22:35:03 -08:00
|
|
|
|
2012-09-30 23:59:35 -07:00
|
|
|
|
2012-01-07 04:34:30 -08:00
|
|
|
// TABLE CELL SIZING
|
|
|
|
// -----------------
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2012-06-25 14:37:35 -07:00
|
|
|
// Reset default grid behavior
|
2012-10-03 09:43:14 -07:00
|
|
|
table td[class*="span"],
|
2012-11-30 16:18:40 -08:00
|
|
|
table th[class*="span"] {
|
2012-06-25 14:37:35 -07:00
|
|
|
display: table-cell;
|
|
|
|
float: none; // undo default grid column styles
|
|
|
|
margin-left: 0; // undo default grid column styles
|
|
|
|
}
|
|
|
|
|
2012-08-07 22:50:49 -07:00
|
|
|
// TABLE BACKGROUNDS
|
|
|
|
// -----------------
|
|
|
|
// Exact selectors below required to override .table-striped
|
|
|
|
|
2012-08-27 21:06:21 -07:00
|
|
|
.table tbody tr {
|
|
|
|
&.success td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: @state-success-background;
|
2012-08-07 22:50:49 -07:00
|
|
|
}
|
2012-08-27 21:06:21 -07:00
|
|
|
&.error td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: @state-error-background;
|
2012-08-07 22:50:49 -07:00
|
|
|
}
|
2012-08-27 21:06:21 -07:00
|
|
|
&.warning td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: @state-warning-background;
|
2012-08-22 11:20:31 +02:00
|
|
|
}
|
2012-08-27 21:06:21 -07:00
|
|
|
&.info td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: @state-info-background;
|
2012-08-07 22:50:49 -07:00
|
|
|
}
|
|
|
|
}
|
2012-08-27 21:06:21 -07:00
|
|
|
|
|
|
|
// Hover states for .table-hover
|
|
|
|
.table-hover tbody tr {
|
|
|
|
&.success:hover td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: darken(@state-success-background, 5%);
|
2012-08-27 21:06:21 -07:00
|
|
|
}
|
|
|
|
&.error:hover td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: darken(@state-error-background, 5%);
|
2012-08-27 21:06:21 -07:00
|
|
|
}
|
|
|
|
&.warning:hover td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: darken(@state-warning-background, 5%);
|
2012-08-27 21:06:21 -07:00
|
|
|
}
|
|
|
|
&.info:hover td {
|
2012-11-30 15:38:31 -08:00
|
|
|
background-color: darken(@state-info-background, 5%);
|
2012-08-27 21:06:21 -07:00
|
|
|
}
|
|
|
|
}
|