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 {
width: 100%;
overflow-x: auto;
overflow-y: hidden;
> .wikitable {
display: table;

View file

@ -70,9 +70,14 @@
}
}
thead:has( + tbody:not( :empty ) ),
thead:has( + tfoot:not( :empty ) ),
tbody:has( + tfoot:not( :empty ) ) {
/* Add border separator between tr, thead, tbody, tfoot */
> :not( [ hidden ] ) ~ :not( [ hidden ] ),
> * > :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 {
th,
td {
@ -87,9 +92,7 @@
}
}
thead + tbody:not( :empty ),
thead + tfoot:not( :empty ),
tbody + tfoot:not( :empty ) {
> * + :not( :empty ) {
tr:first-of-type {
th,
td {