From a8aa4b8936efb5740495db0c8675eb1944f9e082 Mon Sep 17 00:00:00 2001 From: JWB Date: Sat, 15 Mar 2025 19:35:02 -0400 Subject: [PATCH 1/2] Striped table rows cleancss fix Its a little dirty, but it works. CleanCSS was causing the issue, and we can tell it to not modify that code block. I tried it a few different ways before I settings with this. --- scss/content/_table.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scss/content/_table.scss b/scss/content/_table.scss index 1239bc6f..ec111cf7 100644 --- a/scss/content/_table.scss +++ b/scss/content/_table.scss @@ -50,13 +50,13 @@ // Striped @if enable-classes { - #{$parent-selector} table { - &.striped { - tbody tr:nth-child(odd) th, - tbody tr:nth-child(odd) td { - background-color: var(#{$css-var-prefix}table-row-stripped-background-color); - } + /* clean-css ignore:start */ + #{$parent-selector} table.striped { + tbody tr:nth-child(odd of :not([hidden])) th, + tbody tr:nth-child(odd of :not([hidden])) td { + background-color: var(#{$css-var-prefix}table-row-stripped-background-color); } } + /* clean-css ignore:end */ } } From ee5246de8823b7e1fbcba20994517467c3250b5c Mon Sep 17 00:00:00 2001 From: JWB Date: Sat, 15 Mar 2025 23:07:44 -0400 Subject: [PATCH 2/2] Update _table.scss use `:is()` --- scss/content/_table.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scss/content/_table.scss b/scss/content/_table.scss index ec111cf7..b662146a 100644 --- a/scss/content/_table.scss +++ b/scss/content/_table.scss @@ -50,13 +50,13 @@ // Striped @if enable-classes { - /* clean-css ignore:start */ #{$parent-selector} table.striped { - tbody tr:nth-child(odd of :not([hidden])) th, - tbody tr:nth-child(odd of :not([hidden])) td { - background-color: var(#{$css-var-prefix}table-row-stripped-background-color); + tbody tr:is(:nth-child(odd of :not([hidden]))) { + th, + td { + background-color: var(#{$css-var-prefix}table-row-stripped-background-color); + } } } - /* clean-css ignore:end */ } }