From cc0820c204aac9addf1a9316fb4026bcd02abe5f Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Sat, 20 Jul 2024 19:53:26 -0400 Subject: [PATCH] =?UTF-8?q?feat(wikitable):=20=E2=9C=A8=20use=20more=20acc?= =?UTF-8?q?urate=20selectors=20to=20apply=20border=20and=20border=20radius?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/OverflowElements.less | 1 + .../skinning/content.tables.less | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/skins.citizen.styles/components/OverflowElements.less b/resources/skins.citizen.styles/components/OverflowElements.less index 66ea9e5c..e504bafe 100644 --- a/resources/skins.citizen.styles/components/OverflowElements.less +++ b/resources/skins.citizen.styles/components/OverflowElements.less @@ -41,6 +41,7 @@ &-content { width: 100%; overflow-x: auto; + overflow-y: hidden; > .wikitable { display: table; diff --git a/resources/skins.citizen.styles/skinning/content.tables.less b/resources/skins.citizen.styles/skinning/content.tables.less index 78205b3d..4bacca26 100644 --- a/resources/skins.citizen.styles/skinning/content.tables.less +++ b/resources/skins.citizen.styles/skinning/content.tables.less @@ -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 {