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%;
|
2013-03-31 20:29:05 -04:00
|
|
|
background-color: @table-bg;
|
2012-01-20 16:16:40 -05:00
|
|
|
}
|
2013-02-08 11:24:10 -05:00
|
|
|
th {
|
|
|
|
text-align: left;
|
|
|
|
}
|
2012-10-01 02:59:35 -04:00
|
|
|
|
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Baseline styles
|
2011-08-17 01:58:01 -04:00
|
|
|
// ---------------
|
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%;
|
2013-05-10 11:21:27 -04:00
|
|
|
margin-bottom: @line-height-computed;
|
2012-01-18 02:39:18 -05:00
|
|
|
// Cells
|
2013-07-02 14:25:57 -04:00
|
|
|
thead,
|
2013-07-05 15:15:00 -04:00
|
|
|
tbody,
|
|
|
|
tfoot {
|
2013-07-02 14:25:57 -04:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-18 02:34:04 -04:00
|
|
|
padding: @table-cell-padding;
|
2013-07-02 14:25:57 -04:00
|
|
|
line-height: @line-height-base;
|
|
|
|
vertical-align: top;
|
|
|
|
border-top: 1px solid @table-border-color;
|
|
|
|
}
|
|
|
|
}
|
2012-01-18 02:39:18 -05:00
|
|
|
}
|
2012-02-11 02:07:32 -05:00
|
|
|
// Bottom align for column headings
|
2013-04-14 23:33:10 -04:00
|
|
|
thead > tr > th {
|
2012-02-11 02:07:32 -05:00
|
|
|
vertical-align: bottom;
|
2013-08-17 17:15:33 -04:00
|
|
|
border-bottom: 2px solid @table-border-color;
|
2012-01-18 02:39:18 -05:00
|
|
|
}
|
|
|
|
// Remove top border from thead by default
|
2013-07-02 14:25:57 -04:00
|
|
|
caption + thead,
|
|
|
|
colgroup + thead,
|
|
|
|
thead:first-child {
|
|
|
|
tr:first-child {
|
|
|
|
th, td {
|
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
}
|
2012-01-18 02:39:18 -05:00
|
|
|
}
|
|
|
|
// Account for multiple tbody instances
|
|
|
|
tbody + tbody {
|
2013-04-14 22:45:32 -04:00
|
|
|
border-top: 2px solid @table-border-color;
|
2012-01-18 02:39:18 -05:00
|
|
|
}
|
2012-12-08 15:57:21 -05:00
|
|
|
|
|
|
|
// Nesting
|
|
|
|
.table {
|
2013-03-31 20:29:05 -04:00
|
|
|
background-color: @body-bg;
|
2012-12-08 15:57:21 -05:00
|
|
|
}
|
2012-01-11 12:43:13 -05:00
|
|
|
}
|
|
|
|
|
2011-10-31 22:37:10 -04:00
|
|
|
|
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Condensed table w/ half padding
|
2011-11-30 01:35:03 -05:00
|
|
|
// -------------------------------
|
2011-10-31 22:37:10 -04:00
|
|
|
|
2012-01-15 00:28:47 -05:00
|
|
|
.table-condensed {
|
2013-07-02 14:25:57 -04:00
|
|
|
thead,
|
2013-07-05 15:15:00 -04:00
|
|
|
tbody,
|
|
|
|
tfoot {
|
2013-07-02 14:25:57 -04:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-18 02:34:04 -04:00
|
|
|
padding: @table-condensed-cell-padding;
|
2013-07-02 14:25:57 -04:00
|
|
|
}
|
|
|
|
}
|
2011-09-08 13:47:05 -04:00
|
|
|
}
|
2011-10-31 22:37:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-10-01 02:59:35 -04:00
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Bordered version
|
2011-10-31 22:37:10 -04:00
|
|
|
// ----------------
|
|
|
|
|
2012-01-15 00:28:47 -05:00
|
|
|
.table-bordered {
|
2013-04-14 22:45:32 -04:00
|
|
|
border: 1px solid @table-border-color;
|
2013-07-02 14:25:57 -04:00
|
|
|
> thead,
|
2013-07-05 15:15:00 -04:00
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
2013-07-02 14:25:57 -04:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-23 13:48:30 -04:00
|
|
|
border: 1px solid @table-border-color;
|
2013-07-02 14:25:57 -04:00
|
|
|
}
|
2013-07-01 08:29:41 -04:00
|
|
|
}
|
2012-07-20 00:06:42 -04:00
|
|
|
}
|
2013-08-17 17:15:33 -04:00
|
|
|
> thead {
|
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
|
|
|
border-bottom-width: 2px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
|
|
|
|
2011-06-30 03:15:37 -04:00
|
|
|
|
2012-07-20 00:06:42 -04:00
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Zebra-striping
|
2011-11-30 01:35:03 -05:00
|
|
|
// --------------
|
|
|
|
|
|
|
|
// 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 {
|
2013-07-02 14:25:57 -04:00
|
|
|
> tr:nth-child(odd) {
|
|
|
|
> td,
|
|
|
|
> th {
|
|
|
|
background-color: @table-bg-accent;
|
|
|
|
}
|
2011-11-30 01:35:03 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-10-01 02:59:35 -04:00
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Hover effect
|
2012-02-05 05:28:42 -05:00
|
|
|
// ------------
|
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 {
|
2013-07-02 14:25:57 -04:00
|
|
|
> tr:hover {
|
|
|
|
> td,
|
|
|
|
> th {
|
|
|
|
background-color: @table-bg-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
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Table cell sizing
|
2012-01-07 07:34:30 -05:00
|
|
|
// -----------------
|
2011-10-31 22:37:10 -04:00
|
|
|
|
2013-03-01 01:47:32 -05:00
|
|
|
// Reset default table behavior
|
2013-06-23 18:05:50 -04:00
|
|
|
table col[class^="col-"] {
|
2013-03-01 01:47:32 -05:00
|
|
|
float: none;
|
|
|
|
display: table-column;
|
|
|
|
}
|
2013-07-02 14:25:57 -04:00
|
|
|
table {
|
2013-07-05 15:15:00 -04:00
|
|
|
td,
|
|
|
|
th {
|
2013-07-02 14:25:57 -04:00
|
|
|
&[class^="col-"] {
|
|
|
|
float: none;
|
|
|
|
display: table-cell;
|
|
|
|
}
|
|
|
|
}
|
2012-06-25 17:37:35 -04:00
|
|
|
}
|
|
|
|
|
2013-06-23 18:05:50 -04:00
|
|
|
|
|
|
|
|
2013-07-23 13:48:30 -04:00
|
|
|
// Table backgrounds
|
2012-08-08 01:50:49 -04:00
|
|
|
// -----------------
|
2013-07-24 01:27:49 -04:00
|
|
|
// Exact selectors below required to override `.table-striped` and prevent
|
|
|
|
// inheritance to nested tables.
|
2012-08-08 01:50:49 -04:00
|
|
|
|
2013-07-24 01:27:49 -04:00
|
|
|
.table > thead > tr,
|
|
|
|
.table > tbody > tr,
|
|
|
|
.table > tfoot > tr {
|
2013-07-18 03:10:22 -04:00
|
|
|
> td.active,
|
|
|
|
> th.active,
|
2013-07-25 13:01:42 -04:00
|
|
|
&.active > td,
|
|
|
|
&.active > th {
|
2013-08-06 14:40:02 -04:00
|
|
|
background-color: @table-bg-active;
|
2013-07-18 03:10:22 -04:00
|
|
|
}
|
2012-08-08 01:50:49 -04:00
|
|
|
}
|
2012-08-28 00:06:21 -04:00
|
|
|
|
2013-08-14 15:16:45 -04:00
|
|
|
// Contextual variants
|
|
|
|
// -------------------
|
|
|
|
.table-row-variant(success; @state-success-bg; @state-success-border);
|
|
|
|
|
|
|
|
.table-row-variant(danger; @state-danger-bg; @state-danger-border);
|
|
|
|
|
|
|
|
.table-row-variant(warning; @state-warning-bg; @state-warning-border);
|