feat(wikitable): use more accurate selectors to apply border and border radius

This commit is contained in:
alistair3149 2024-07-20 19:53:26 -04:00
parent 2fe94438ee
commit cc0820c204
No known key found for this signature in database
2 changed files with 10 additions and 6 deletions

View file

@ -41,6 +41,7 @@
&-content { &-content {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
> .wikitable { > .wikitable {
display: table; display: table;

View file

@ -70,9 +70,14 @@
} }
} }
thead:has( + tbody:not( :empty ) ), /* Add border separator between tr, thead, tbody, tfoot */
thead:has( + tfoot:not( :empty ) ), > :not( [ hidden ] ) ~ :not( [ hidden ] ),
tbody:has( + tfoot:not( :empty ) ) { > * > :not( [ hidden ] ) ~ :not( [ hidden ] ) {
border-top: var( --border-width-base ) solid var( --border-color-base );
}
/* Reset border radius between thead tbody, tbody tfoot, etc. */
> :has( + :not( :empty ) ) {
tr:last-of-type { tr:last-of-type {
th, th,
td { td {
@ -87,9 +92,7 @@
} }
} }
thead + tbody:not( :empty ), > * + :not( :empty ) {
thead + tfoot:not( :empty ),
tbody + tfoot:not( :empty ) {
tr:first-of-type { tr:first-of-type {
th, th,
td { td {