Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: delay and repeat custom prop support on base class #1780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

allanemerson
Copy link

Fixes #1544

From the docs: Since version 4, Animate.css uses custom properties (also known as CSS variables) to define the animation's duration, delay, and iterations.

However, only animation-duration is defined on .animated currently , so defining delay and repeat props on the element or at :root have no effect unless you add one of the modifier classes.

It would be possible to add the delay-1s and repeat-1 classes to trigger the expected behavior, but then you might get a mismatch between the prop value (say you pass in 1.5s on one element and 2 repeats on another, etc).

By adding animation-delay and animation-iteration-count on the base class, explicit control can be set on each element and globally.

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.

--animate-delay for each element?
1 participant