Skip to content

Starting Style in the Base Layer #18280

Answered by wongjn
audinue asked this question in Help
Discussion options

You must be logged in to vote

This unexpected behavior is not really to do with Tailwind itself but rather specificity. As per the MDN docs:

Note: The @starting-style at-rule and the "original rule" have the same specificity. To ensure that starting styles get applied, include the @starting-style at-rule after the "original rule". If you specify the @starting-style at-rule before the "original rule", the original styles will override the starting styles.

Thus, having the .starting-opacity-bug in the base layer means that the group-hover:opacity-100 class would override it, essentially meaning that the @starting-style in .starting-opacity-bug would not apply. You would need to increase the specificity of this rule. F…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by audinue
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18276 on June 11, 2025 08:02.