]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix(tables): support simpler table structure
authorGaël Poupard <ffoodd@users.noreply.github.com>
Wed, 16 Jun 2021 15:42:18 +0000 (17:42 +0200)
committerMark Otto <markd.otto@gmail.com>
Tue, 12 Apr 2022 22:28:42 +0000 (15:28 -0700)
Fixes #34184

Not quite sure about this, but requiring a `tbody` doesn't feel right either…

scss/_tables.scss

index 601d86cc9f4009b9bada2e47d50c3471f1589f7e..6abf53bd1f8fde45ccc05fd6bbcfaa0af94c2506 100644 (file)
   // 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;
 
 .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;
   }
 }
 // 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
 
 .table-borderless {
   // stylelint-disable-next-line selector-max-universal
-  > :not(caption) > * > * {
+  > tr > *,
+  > thead > tr > *,
+  > tbody > tr > *,
+  > tfoot > tr > * {
     border-bottom-width: 0;
   }