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