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