Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaël Poupard <ffoodd@users.noreply.github.com>2021-06-16 18:42:18 +0300
committerMark Otto <markd.otto@gmail.com>2022-04-13 01:28:42 +0300
commit7187e05cb941138c0e191ef0f28a08430d0e5f8f (patch)
tree8be546f9ad58980f9d8eb3e0f2a34283ffd1e7ac
parent33992b7d5b2176d90aee9a1933219b498a9888d4 (diff)
fix(tables): support simpler table structure
Fixes #34184 Not quite sure about this, but requiring a `tbody` doesn't feel right either…
-rw-r--r--scss/_tables.scss20
1 files changed, 16 insertions, 4 deletions
diff --git a/scss/_tables.scss b/scss/_tables.scss
index 601d86cc9f..6abf53bd1f 100644
--- a/scss/_tables.scss
+++ b/scss/_tables.scss
@@ -25,7 +25,10 @@
// We use the universal selectors here to simplify the selector (else we would need 6 different selectors).
// Another advantage is that this generates less code and makes the selector less specific making it easier to override.
// stylelint-disable-next-line selector-max-universal
- > :not(caption) > * > * {
+ > tr > *,
+ > thead > tr > *,
+ > tbody > tr > *,
+ > tfoot > tr > * {
padding: $table-cell-padding-y $table-cell-padding-x;
background-color: var(--#{$prefix}table-bg);
border-bottom-width: $table-border-width;
@@ -60,7 +63,10 @@
.table-sm {
// stylelint-disable-next-line selector-max-universal
- > :not(caption) > * > * {
+ > tr > *,
+ > thead > tr > *,
+ > tbody > tr > *,
+ > tfoot > tr > * {
padding: $table-cell-padding-y-sm $table-cell-padding-x-sm;
}
}
@@ -76,7 +82,10 @@
// to the `td`s or `th`s
.table-bordered {
- > :not(caption) > * {
+ > tr,
+ > thead > tr,
+ > tbody > tr,
+ > tfoot > tr {
border-width: $table-border-width 0;
// stylelint-disable-next-line selector-max-universal
@@ -88,7 +97,10 @@
.table-borderless {
// stylelint-disable-next-line selector-max-universal
- > :not(caption) > * > * {
+ > tr > *,
+ > thead > tr > *,
+ > tbody > tr > *,
+ > tfoot > tr > * {
border-bottom-width: 0;
}