Compare commits

...

4 Commits

Author SHA1 Message Date
Patrick H. Lauke 8c14e7134e Merge branch 'main' into main-fod-simpler-table-structure 2023-01-21 19:02:57 +00:00
Gaël Poupard 87239efb59 styles(tables): forgotten stylelint-disable 2022-04-12 15:28:42 -07:00
Gaël Poupard f50ab21f01 styles(tables): drop unused stylelint-disable 2022-04-12 15:28:42 -07:00
Gaël Poupard 7187e05cb9 fix(tables): support simpler table structure
Fixes #34184 

Not quite sure about this, but requiring a `tbody` doesn't feel right either…
2022-04-12 15:28:42 -07:00
+16 -8
View File
@@ -24,8 +24,10 @@
// We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
// 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;
@@ -59,8 +61,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,10 +80,12 @@
// 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
> * {
border-width: 0 $table-border-width;
}
@@ -87,8 +93,10 @@
}
.table-borderless {
// stylelint-disable-next-line selector-max-universal
> :not(caption) > * > * {
> tr > *,
> thead > tr > *,
> tbody > tr > *,
> tfoot > tr > * {
border-bottom-width: 0;
}