You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems this statement: "It’s important to note that overriding a style with a utility directly on the child itself won’t work due to the specificity of the generated child selector." - is not correct.
Hey! The specificity of a selector using child combinators may be higher than one that doesn't, even though this is not reflected in the specificity value. You can learn more about it here:
Combinators, such as +, >, ~, " ", and ||, may make a selector more specific in what is selected but they don't add any value to the specificity weight.
So while you're right that *:… utilities will appear later in the generated stylesheet, I don't think it's necessarily wrong to call out specificity here. Thanks for the comment tho!
Hi Tailwindcss Team!
Seems this statement: "It’s important to note that overriding a style with a utility directly on the child itself won’t work due to the specificity of the generated child selector." - is not correct.
It's more about order of appearence.
https://tailwindcss.com/docs/hover-focus-and-other-states#styling-direct-children
The text was updated successfully, but these errors were encountered: