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