Skip to content

Conversation

@swiing
Copy link

@swiing swiing commented Feb 8, 2025

:where() has 0 specificity, the consequence of which is that style does not apply, as it is overridden by other css rules. => use :is() instead

Closes #5672

Changed

replace :where() css by :is()

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Merge checklist

`:where()` has 0 specificity, the consequence of which is that style does not apply, as it is overridden by other css rules.
=> use `:is()` instead
@swiing swiing requested a review from a team as a code owner February 8, 2025 11:08
@swiing swiing requested a review from camertron February 8, 2025 11:09
@lesliecdubs lesliecdubs removed the request for review from camertron March 4, 2025 21:18
@joshblack joshblack self-requested a review March 6, 2025 16:12
@joshblack
Copy link
Member

Hi there @swiing! 👋 Thanks for taking the time to open up a PR 🙏

When looking at this it seems like the selector has a specificity of 0,1,0 since the :where() is nested within a class. The issue seems to be related to ordering of classes when looking at the compiled CSS:

An image of devtools showing that a CSS class with the same specificity is winning out over the intended CSS class

We could also totally increase the specificity like in this PR (which I think would go to 0,2,0) but I think with how these two interact it would make more sense to change the ordering. I opened up: #5765 to hopefully address this 🤞

Hope that makes sense, let me know if you have any questions!

@swiing
Copy link
Author

swiing commented Mar 12, 2025

Hi @joshblack , lgtm

@joshblack joshblack closed this Mar 12, 2025
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.

Checked radio does not display properly

2 participants