Skip to content

Conversation

Yohn
Copy link

@Yohn Yohn commented Mar 15, 2025

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.

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.
@lucaslarroche
Copy link
Member

lucaslarroche commented Mar 16, 2025

@Yohn, great find, you are right, it's the minifier.

I did more tests and actually we could do this:

tbody {
  // Striped rows skip hidden elements (`odd of :not([hidden])`), `:is()` prevents minifier issues.
  tr:is(:nth-child(odd of :not([hidden]))) {
    th,
    td {
      background-color: var(#{$css-var-prefix}table-row-stripped-background-color);
    }
  }
}

What do you think?

@Yohn
Copy link
Author

Yohn commented Mar 16, 2025

Nice find! Idk why I didn't think to try is() when I was messing with that. I'll modify this pull request for that change.

use `:is()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants