2011-11-26 13:34:55 +08:00
|
|
|
//
|
2015-08-18 09:33:34 +08:00
|
|
|
// Basic Bootstrap table
|
2014-12-19 14:59:47 +08:00
|
|
|
//
|
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%;
|
2014-06-09 07:54:05 +08:00
|
|
|
max-width: 100%;
|
2014-12-05 07:25:57 +08:00
|
|
|
margin-bottom: $spacer;
|
Drop Normalize, port relevant parts to Reboot (#21741)
* Get this party started by removing mention of Normalize.css
* Nuke the old comment, consolidate to a single line and number as appropriate
* Bring over styles for HTML element from Normalize to Reboot
* Move margin override for body element from Normalize to Reboot
* Drop the block reset for HTML5 elements in IE9- from Normalize given we dropped IE9 support
* Building on previous commit, do the same thing for figure, figcaption, and main
* Remove IE9- display from Normalize given our browser support
* Drop IE8 figure margin because we're IE10+
* No need for the h1 overrides because we reset these font and margin styles anyway in _type.scss already
* Drop Safari 6 b and strong normalization because we're Safari 8+
* Remove mark styles for IE9- from Normalize
* Remove old iOS audio fixes from Normalize
* Remove IE9- display for progress from Normalize
* Remove more IE9- rules from Normalize
* One more IE9- display removal for canvas element
* Move pre overrides from Normalize to Reboot
* Move over some link resets to Reboot, drop others
- Move over background-color and text-decoration
- Drop focus outline change given it affects the offset on hover of
focused links
* Move over more code element resets, consolidate with pre overrides, too
* Move over sub and sup wholesale
* Move over img normalization to Reboot
* Move over SVG override too
* - Drop dupe hidden, but add comment for it
- Move over template
- Move over summary
* Remove bulk of @viewport comment
* edit down that code comment
* consolidate html-based normalizations
* update comments
* Consolidate abbr styles
* move over more type elements
* move over hr changes
* move over form controls and more
* move over button resets
* move over firefox button changes
* move over search changes and more
* we nuke all these styles for fieldsets anyway, so outright remove them
* no need for those, we override them
* move over legend, fieldset, progress
* line break
* delete normalize file
* linting
* update comment
* clarify docs mentions of normalize and reboot
* remove normalize excludes from linter
* remove normalize excludes from cli task
* linting
* callout license since we forked part of normalize
* Improve comments, move table background reset to .table class instead of in reboot
* trailing space
2017-01-22 06:14:25 +08:00
|
|
|
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
2014-12-05 07:25:57 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: $table-cell-padding;
|
|
|
|
vertical-align: top;
|
2015-11-15 15:24:48 +08:00
|
|
|
border-top: $table-border-width solid $table-border-color;
|
2012-01-18 15:39:18 +08:00
|
|
|
}
|
2014-12-19 14:59:47 +08:00
|
|
|
|
|
|
|
thead th {
|
2012-02-11 15:07:32 +08:00
|
|
|
vertical-align: bottom;
|
2015-11-15 15:24:48 +08:00
|
|
|
border-bottom: (2 * $table-border-width) solid $table-border-color;
|
2012-01-18 15:39:18 +08:00
|
|
|
}
|
2014-12-19 14:59:47 +08:00
|
|
|
|
|
|
|
tbody + tbody {
|
2015-11-15 15:24:48 +08:00
|
|
|
border-top: (2 * $table-border-width) solid $table-border-color;
|
2012-01-18 15:39:18 +08:00
|
|
|
}
|
2012-12-09 04:57:21 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
.table {
|
|
|
|
background-color: $body-bg;
|
|
|
|
}
|
2012-01-12 01:43:13 +08:00
|
|
|
}
|
|
|
|
|
2011-11-01 10:37:10 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
//
|
2013-07-24 01:48:30 +08:00
|
|
|
// Condensed table w/ half padding
|
2014-12-19 14:59:47 +08:00
|
|
|
//
|
2011-11-01 10:37:10 +08:00
|
|
|
|
2014-09-18 13:14:27 +08:00
|
|
|
.table-sm {
|
2014-12-19 14:59:47 +08:00
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: $table-sm-cell-padding;
|
2011-09-09 01:47:05 +08:00
|
|
|
}
|
2011-11-01 10:37:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-07-24 01:48:30 +08:00
|
|
|
// Bordered version
|
2013-08-19 12:43:05 +08:00
|
|
|
//
|
|
|
|
// Add borders all around the table and between all the columns.
|
2011-11-01 10:37:10 +08:00
|
|
|
|
2012-01-15 13:28:47 +08:00
|
|
|
.table-bordered {
|
2015-11-15 15:24:48 +08:00
|
|
|
border: $table-border-width solid $table-border-color;
|
2014-12-19 14:59:47 +08:00
|
|
|
|
|
|
|
th,
|
|
|
|
td {
|
2015-11-15 15:24:48 +08:00
|
|
|
border: $table-border-width solid $table-border-color;
|
2012-07-20 12:06:42 +08:00
|
|
|
}
|
2014-12-19 14:59:47 +08:00
|
|
|
|
|
|
|
thead {
|
|
|
|
th,
|
|
|
|
td {
|
2015-11-15 15:24:48 +08:00
|
|
|
border-bottom-width: (2 * $table-border-width);
|
2013-08-18 05:15:33 +08:00
|
|
|
}
|
|
|
|
}
|
2011-05-04 09:09:25 +08:00
|
|
|
}
|
|
|
|
|
2011-06-30 15:15:37 +08:00
|
|
|
|
2013-07-24 01:48:30 +08:00
|
|
|
// Zebra-striping
|
2013-08-19 12:43:05 +08:00
|
|
|
//
|
2011-11-30 14:35:03 +08:00
|
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
2013-08-19 12:43:05 +08:00
|
|
|
|
2013-11-07 10:32:35 +08:00
|
|
|
.table-striped {
|
2015-01-20 06:48:12 +08:00
|
|
|
tbody tr:nth-of-type(odd) {
|
2014-12-03 06:02:35 +08:00
|
|
|
background-color: $table-bg-accent;
|
2011-11-30 14:35:03 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-07-24 01:48:30 +08:00
|
|
|
// Hover effect
|
2013-08-19 12:43:05 +08:00
|
|
|
//
|
2012-02-05 18:28:42 +08:00
|
|
|
// Placed here since it has to come after the potential zebra striping
|
2013-08-19 12:43:05 +08:00
|
|
|
|
2013-11-07 10:32:35 +08:00
|
|
|
.table-hover {
|
2015-01-01 17:05:01 +08:00
|
|
|
tbody tr {
|
|
|
|
@include hover {
|
|
|
|
background-color: $table-bg-hover;
|
|
|
|
}
|
2012-02-05 18:28:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-30 14:35:03 +08:00
|
|
|
|
2013-07-24 01:48:30 +08:00
|
|
|
// Table backgrounds
|
2013-08-19 12:43:05 +08:00
|
|
|
//
|
2013-07-24 13:27:49 +08:00
|
|
|
// Exact selectors below required to override `.table-striped` and prevent
|
|
|
|
// inheritance to nested tables.
|
2012-08-08 13:50:49 +08:00
|
|
|
|
2013-08-19 12:43:05 +08:00
|
|
|
// Generate the contextual variants
|
2014-12-03 06:02:35 +08:00
|
|
|
@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);
|
2013-08-19 12:43:05 +08:00
|
|
|
|
|
|
|
|
2016-05-12 07:28:28 +08:00
|
|
|
// Inverse styles
|
2013-08-19 12:43:05 +08:00
|
|
|
//
|
2016-08-09 11:35:58 +08:00
|
|
|
// Same table markup, but inverted color scheme: dark background and light text.
|
2014-07-14 14:45:34 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
.thead-inverse {
|
|
|
|
th {
|
2016-12-20 13:50:31 +08:00
|
|
|
color: $table-inverse-color;
|
|
|
|
background-color: $table-inverse-bg;
|
2014-07-14 14:45:34 +08:00
|
|
|
}
|
|
|
|
}
|
2016-05-12 07:28:28 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
.thead-default {
|
|
|
|
th {
|
2016-04-18 09:56:09 +08:00
|
|
|
color: $table-head-color;
|
|
|
|
background-color: $table-head-bg;
|
2014-07-14 14:45:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-14 15:23:46 +08:00
|
|
|
.table-inverse {
|
2016-12-20 13:50:31 +08:00
|
|
|
color: $table-inverse-color;
|
|
|
|
background-color: $table-inverse-bg;
|
2014-07-14 15:23:46 +08:00
|
|
|
|
2014-12-19 14:59:47 +08:00
|
|
|
th,
|
2015-01-20 07:52:40 +08:00
|
|
|
td,
|
|
|
|
thead th {
|
2017-03-20 07:52:39 +08:00
|
|
|
border-color: $table-inverse-border;
|
2014-07-14 15:23:46 +08:00
|
|
|
}
|
2016-05-12 07:28:28 +08:00
|
|
|
|
|
|
|
&.table-bordered {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Responsive tables
|
|
|
|
//
|
2016-11-26 17:46:11 +08:00
|
|
|
// Add `.table-responsive` to `.table`s and we'll make them mobile friendly by
|
|
|
|
// enabling horizontal scrolling. Only applies <768px. Everything above that
|
2016-05-12 07:28:28 +08:00
|
|
|
// will display normally.
|
|
|
|
|
|
|
|
.table-responsive {
|
2017-03-20 07:54:03 +08:00
|
|
|
@include media-breakpoint-down(md) {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
overflow-x: auto;
|
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
|
|
|
|
|
|
|
// Prevent double border on horizontal scroll due to use of `display: block;`
|
|
|
|
&.table-bordered {
|
|
|
|
border: 0;
|
|
|
|
}
|
2016-11-26 17:44:06 +08:00
|
|
|
}
|
2014-07-14 15:23:46 +08:00
|
|
|
}
|