2011-11-25 21:34:55 -08:00
|
|
|
//
|
2012-06-28 21:46:45 -07:00
|
|
|
// Tables
|
|
|
|
// --------------------------------------------------
|
2011-05-03 18:09:25 -07:00
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2012-01-20 21:16:40 +00:00
|
|
|
table {
|
2013-03-31 17:29:05 -07:00
|
|
|
background-color: @table-bg;
|
2012-01-20 21:16:40 +00:00
|
|
|
}
|
2014-07-12 15:55:15 -07:00
|
|
|
caption {
|
|
|
|
padding-top: @table-cell-padding;
|
|
|
|
padding-bottom: @table-cell-padding;
|
|
|
|
color: @text-muted;
|
|
|
|
text-align: left;
|
|
|
|
}
|
2013-02-08 08:24:10 -08:00
|
|
|
th {
|
|
|
|
text-align: left;
|
|
|
|
}
|
2012-09-30 23:59:35 -07:00
|
|
|
|
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Baseline styles
|
2011-05-03 18:09:25 -07:00
|
|
|
|
2012-01-17 23:39:18 -08:00
|
|
|
.table {
|
2011-05-03 18:09:25 -07:00
|
|
|
width: 100%;
|
2014-06-08 16:54:05 -07:00
|
|
|
max-width: 100%;
|
2013-05-10 09:21:27 -06:00
|
|
|
margin-bottom: @line-height-computed;
|
2012-01-17 23:39:18 -08:00
|
|
|
// Cells
|
2013-08-27 17:13:07 -07:00
|
|
|
> thead,
|
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
2013-07-02 11:25:57 -07:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-17 23:34:04 -07:00
|
|
|
padding: @table-cell-padding;
|
2013-07-02 11:25:57 -07:00
|
|
|
line-height: @line-height-base;
|
|
|
|
vertical-align: top;
|
|
|
|
border-top: 1px solid @table-border-color;
|
|
|
|
}
|
|
|
|
}
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
2012-02-10 23:07:32 -08:00
|
|
|
// Bottom align for column headings
|
2013-08-27 17:13:07 -07:00
|
|
|
> thead > tr > th {
|
2012-02-10 23:07:32 -08:00
|
|
|
vertical-align: bottom;
|
2013-08-17 14:15:33 -07:00
|
|
|
border-bottom: 2px solid @table-border-color;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
|
|
|
// Remove top border from thead by default
|
2013-08-27 17:13:07 -07:00
|
|
|
> caption + thead,
|
|
|
|
> colgroup + thead,
|
|
|
|
> thead:first-child {
|
|
|
|
> tr:first-child {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-02 11:25:57 -07:00
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
}
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
|
|
|
// Account for multiple tbody instances
|
2013-08-27 17:13:07 -07:00
|
|
|
> tbody + tbody {
|
2013-04-14 19:45:32 -07:00
|
|
|
border-top: 2px solid @table-border-color;
|
2012-01-17 23:39:18 -08:00
|
|
|
}
|
2012-12-08 12:57:21 -08:00
|
|
|
|
|
|
|
// Nesting
|
|
|
|
.table {
|
2013-03-31 17:29:05 -07:00
|
|
|
background-color: @body-bg;
|
2012-12-08 12:57:21 -08:00
|
|
|
}
|
2012-01-11 09:43:13 -08:00
|
|
|
}
|
|
|
|
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Condensed table w/ half padding
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-condensed {
|
2013-08-27 17:13:07 -07:00
|
|
|
> thead,
|
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
2013-07-02 11:25:57 -07:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-17 23:34:04 -07:00
|
|
|
padding: @table-condensed-cell-padding;
|
2013-07-02 11:25:57 -07:00
|
|
|
}
|
|
|
|
}
|
2011-09-08 10:47:05 -07:00
|
|
|
}
|
2011-10-31 19:37:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Bordered version
|
2013-08-18 21:43:05 -07:00
|
|
|
//
|
|
|
|
// Add borders all around the table and between all the columns.
|
2011-10-31 19:37:10 -07:00
|
|
|
|
2012-01-14 21:28:47 -08:00
|
|
|
.table-bordered {
|
2013-04-14 19:45:32 -07:00
|
|
|
border: 1px solid @table-border-color;
|
2013-07-02 11:25:57 -07:00
|
|
|
> thead,
|
2013-07-05 14:15:00 -05:00
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
2013-07-02 11:25:57 -07:00
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
2013-07-23 10:48:30 -07:00
|
|
|
border: 1px solid @table-border-color;
|
2013-07-02 11:25:57 -07:00
|
|
|
}
|
2013-07-01 20:29:41 +08:00
|
|
|
}
|
2012-07-19 21:06:42 -07:00
|
|
|
}
|
2013-09-20 18:06:48 +02:00
|
|
|
> thead > tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
|
|
|
border-bottom-width: 2px;
|
2013-08-17 14:15:33 -07:00
|
|
|
}
|
|
|
|
}
|
2011-05-03 18:09:25 -07:00
|
|
|
}
|
|
|
|
|
2011-06-30 00:15:37 -07:00
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Zebra-striping
|
2013-08-18 21:43:05 -07:00
|
|
|
//
|
2011-11-29 22:35:03 -08:00
|
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
2013-08-18 21:43:05 -07:00
|
|
|
|
2013-11-06 18:32:35 -08:00
|
|
|
.table-striped {
|
2015-01-13 14:18:52 +13:00
|
|
|
> tbody > tr:nth-of-type(odd) {
|
2014-06-25 14:01:34 +10:00
|
|
|
background-color: @table-bg-accent;
|
2011-11-29 22:35:03 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Hover effect
|
2013-08-18 21:43:05 -07:00
|
|
|
//
|
2012-02-05 02:28:42 -08:00
|
|
|
// Placed here since it has to come after the potential zebra striping
|
2013-08-18 21:43:05 -07:00
|
|
|
|
2013-11-06 18:32:35 -08:00
|
|
|
.table-hover {
|
|
|
|
> tbody > tr:hover {
|
2014-06-25 15:16:25 +10:00
|
|
|
background-color: @table-bg-hover;
|
2012-02-05 02:28:42 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-29 22:35:03 -08:00
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Table cell sizing
|
2013-08-18 21:43:05 -07:00
|
|
|
//
|
2013-02-28 22:47:32 -08:00
|
|
|
// Reset default table behavior
|
2013-08-18 21:43:05 -07:00
|
|
|
|
2013-08-19 11:30:38 -05:00
|
|
|
table col[class*="col-"] {
|
2014-12-22 17:02:29 -08:00
|
|
|
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
|
2013-02-28 22:47:32 -08:00
|
|
|
float: none;
|
|
|
|
display: table-column;
|
|
|
|
}
|
2013-07-02 11:25:57 -07:00
|
|
|
table {
|
2013-07-05 14:15:00 -05:00
|
|
|
td,
|
|
|
|
th {
|
2013-08-19 11:30:38 -05:00
|
|
|
&[class*="col-"] {
|
2014-12-22 17:02:29 -08:00
|
|
|
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
|
2013-07-02 11:25:57 -07:00
|
|
|
float: none;
|
|
|
|
display: table-cell;
|
|
|
|
}
|
|
|
|
}
|
2012-06-25 14:37:35 -07:00
|
|
|
}
|
|
|
|
|
2013-06-23 15:05:50 -07:00
|
|
|
|
2013-07-23 10:48:30 -07:00
|
|
|
// Table backgrounds
|
2013-08-18 21:43:05 -07:00
|
|
|
//
|
2013-07-23 22:27:49 -07:00
|
|
|
// Exact selectors below required to override `.table-striped` and prevent
|
|
|
|
// inheritance to nested tables.
|
2012-08-07 22:50:49 -07:00
|
|
|
|
2013-08-18 21:43:05 -07:00
|
|
|
// Generate the contextual variants
|
2013-11-07 09:53:33 +01:00
|
|
|
.table-row-variant(active; @table-bg-active);
|
|
|
|
.table-row-variant(success; @state-success-bg);
|
2014-01-07 22:24:45 +01:00
|
|
|
.table-row-variant(info; @state-info-bg);
|
2013-11-07 09:53:33 +01:00
|
|
|
.table-row-variant(warning; @state-warning-bg);
|
2013-12-07 11:47:37 -08:00
|
|
|
.table-row-variant(danger; @state-danger-bg);
|
2013-08-18 21:43:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
// Responsive tables
|
|
|
|
//
|
2013-08-23 07:53:09 +01:00
|
|
|
// Wrap your tables in `.table-responsive` and we'll make them mobile friendly
|
2013-08-18 21:43:05 -07:00
|
|
|
// by enabling horizontal scrolling. Only applies <768px. Everything above that
|
|
|
|
// will display normally.
|
|
|
|
|
2014-02-14 19:48:17 +01:00
|
|
|
.table-responsive {
|
2014-08-02 13:05:11 -07:00
|
|
|
overflow-x: auto;
|
2014-10-25 20:20:24 -07:00
|
|
|
min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
|
2014-08-02 13:05:11 -07:00
|
|
|
|
2014-03-06 21:25:34 -08:00
|
|
|
@media screen and (max-width: @screen-xs-max) {
|
2013-08-18 21:43:05 -07:00
|
|
|
width: 100%;
|
2013-10-14 18:22:31 +02:00
|
|
|
margin-bottom: (@line-height-computed * 0.75);
|
2013-08-18 21:43:05 -07:00
|
|
|
overflow-y: hidden;
|
2013-08-23 07:53:09 +01:00
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
2013-08-18 21:43:05 -07:00
|
|
|
border: 1px solid @table-border-color;
|
|
|
|
|
2013-09-20 18:06:48 +02:00
|
|
|
// Tighten up spacing
|
2013-08-18 21:43:05 -07:00
|
|
|
> .table {
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
// Ensure the content doesn't wrap
|
|
|
|
> thead,
|
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
|
|
|
> tr {
|
|
|
|
> th,
|
|
|
|
> td {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Special overrides for the bordered tables
|
|
|
|
> .table-bordered {
|
|
|
|
border: 0;
|
|
|
|
|
|
|
|
// Nuke the appropriate borders so that the parent can handle them
|
|
|
|
> thead,
|
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
|
|
|
> tr {
|
|
|
|
> th:first-child,
|
|
|
|
> td:first-child {
|
|
|
|
border-left: 0;
|
|
|
|
}
|
|
|
|
> th:last-child,
|
|
|
|
> td:last-child {
|
|
|
|
border-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 08:04:11 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Only nuke the last row's bottom-border in `tbody` and `tfoot` since
|
|
|
|
// chances are there will be only one `tr` in a `thead` and that would
|
|
|
|
// remove the border altogether.
|
|
|
|
> tbody,
|
|
|
|
> tfoot {
|
2013-08-18 21:43:05 -07:00
|
|
|
> tr:last-child {
|
|
|
|
> th,
|
|
|
|
> td {
|
|
|
|
border-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 08:04:11 -07:00
|
|
|
|
2013-08-18 21:43:05 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|