184 lines
3.4 KiB
SCSS
184 lines
3.4 KiB
SCSS
table {
|
|
background-color: $table-bg;
|
|
}
|
|
|
|
caption {
|
|
padding: $table-cell-padding;
|
|
color: $text-muted;
|
|
text-align: left;
|
|
}
|
|
|
|
th {
|
|
text-align: left;
|
|
}
|
|
|
|
|
|
// Baseline styles
|
|
.table {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
margin-bottom: $line-height-computed;
|
|
|
|
// Cells
|
|
> thead,
|
|
> tbody,
|
|
> tfoot {
|
|
> tr {
|
|
> th,
|
|
> td {
|
|
font-size: 12px;
|
|
padding: $table-cell-padding;
|
|
line-height: $line-height-base;
|
|
border-top: 1px solid $table-border-color;
|
|
vertical-align: middle; //top
|
|
|
|
&:not(.no-padding) {
|
|
&:first-child {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
&:last-child {
|
|
padding-right: 5px;
|
|
}
|
|
}
|
|
}
|
|
|
|
> th {
|
|
white-space: nowrap;
|
|
font-weight: 400;
|
|
min-height: 30px;
|
|
height: 30px;
|
|
}
|
|
}
|
|
}
|
|
// Bottom align for column headings
|
|
> thead > tr > th {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
// Remove top border from thead by default
|
|
> caption + thead,
|
|
> colgroup + thead {
|
|
> tr:first-child {
|
|
> th,
|
|
> td {
|
|
border-top: 0;
|
|
}
|
|
}
|
|
}
|
|
// Account for multiple tbody instances
|
|
> tbody + tbody {
|
|
border-top: 2px solid $table-border-color;
|
|
}
|
|
|
|
// Nesting
|
|
.table {
|
|
background-color: $body-bg;
|
|
margin: 0;
|
|
}
|
|
|
|
abbr {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.currency {
|
|
display: inline-block;
|
|
text-align: left;
|
|
margin-left: 3px;
|
|
min-width: 13px;
|
|
}
|
|
|
|
th span.glyphicon {
|
|
margin-left: 6px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn + .btn {
|
|
margin-left: 5px;
|
|
}
|
|
|
|
.btn .bi {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
|
|
// Bordered version
|
|
//
|
|
// Add borders all around the table and between all the columns.
|
|
|
|
.table-bordered {
|
|
border: 1px solid $table-border-color;
|
|
|
|
> thead,
|
|
> tbody,
|
|
> tfoot {
|
|
> tr {
|
|
> th,
|
|
> td {
|
|
border: 1px solid $table-border-color;
|
|
}
|
|
}
|
|
}
|
|
|
|
> thead > tr {
|
|
> th,
|
|
> td {
|
|
border-bottom-width: 2px;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Zebra-striping
|
|
//
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
|
.table-striped {
|
|
> thead > tr {
|
|
background-color: $table-header-bg;
|
|
}
|
|
|
|
> tbody > tr:nth-of-type(odd) {
|
|
background-color: $table-bg;
|
|
}
|
|
|
|
> tbody > tr:nth-of-type(even) {
|
|
background-color: $table-bg-accent;
|
|
}
|
|
}
|
|
|
|
|
|
// Table cell sizing
|
|
//
|
|
// Reset default table behavior
|
|
|
|
table col[class*="col-"] {
|
|
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
|
|
float: none;
|
|
display: table-column;
|
|
}
|
|
|
|
table {
|
|
td,
|
|
th {
|
|
&[class*="col-"] {
|
|
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
|
|
float: none;
|
|
display: table-cell;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Table backgrounds
|
|
//
|
|
// Exact selectors below required to override `.table-striped` and prevent
|
|
// inheritance to nested tables.
|
|
|
|
// Generate the contextual variants
|
|
@include table-row-variant("active", $table-bg-active);
|
|
@include table-row-variant("success", $state-success-bg);
|
|
@include table-row-variant("info", $state-info-bg);
|
|
@include table-row-variant("warning", $state-warning-bg);
|
|
@include table-row-variant("danger", $state-danger-bg);
|