The Big Gotcha With @starting-style • Josh W. Comeau

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

The @starting-style CSS at-rule allows transitions for enter animations but has a significant specificity gotcha. Unlike keyframe animations, @starting-style declarations aren't promoted to a higher priority group, causing them to lose to more specific selectors. This creates unexpected behavior where animations fail to run

12m read time From joshwcomeau.com
Post cover image
Table of contents
Table of ContentsLink to this heading The specificity problemLink to this heading SolutionsLink to this heading Syntactic sugar?Link to this heading An exciting announcement
1 Comment

Sort: