Skip to content

fix: clear animation delays for reduced motion and print - #1937

Open
nemo-crypto wants to merge 1 commit into
animate-css:mainfrom
nemo-crypto:fix/reduced-motion-animation-delay
Open

nemo-crypto wants to merge 1 commit into
animate-css:mainfrom
nemo-crypto:fix/reduced-motion-animation-delay

Conversation

@nemo-crypto

Copy link
Copy Markdown

When animate__fadeIn is combined with animate__delay-5s, enabling reduced motion still leaves the content invisible for five seconds. The media rule shortens the duration to 1ms but preserves the delay. The same rule is used for print.

Set animation-delay: 0s !important in that media rule. Normal-mode delays are unchanged, and the existing nonzero duration remains so consumers waiting for animationend still receive it.

Includes a standalone manual reproduction in tests/reduced-motion.html and an optional Playwright regression runner with setup instructions. The HTML fixture is provided instead of a hosted CodePen.

Validation:

  • npm start builds raw, minified and compatibility CSS successfully.
  • Chromium, Firefox and WebKit: all three builds pass normal/reduced/print delay assertions, visible final content and prompt animationend delivery.
  • The same regression check fails against the original build: reduced-motion delay is 5s, expected 0s.
  • git diff --check passes.

Only source and regression fixtures are committed; distribution CSS can be regenerated by the release build. Browser emulation was used; physical-device and physical-printer testing was not performed.

This branch has not been deployed

No deployments
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.

2 participants