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