Animation utilities - initial state #3457
Unanswered
lewishowles
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For the longest time I've had animation classes, such as:
and these were composed together to allow things like
animate fade-in
.Today I thought I might as well move these into my tailwind config to allow responsive and motion safe variants.
The problem with the fade in animations in particular is that they need an initial state of
opacity:0
, as a 0% keyframe doesn't provide that properly.Other than manually adding initial state classes, which would need the same motion prefixes so that they only apply if the animation does, such as
motion-safe:opacity-0 motion-safe:animate-fade-in
, has anyone come up with a better solution to providing initial state to animations?Beta Was this translation helpful? Give feedback.
All reactions