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
🐛 Stories: Disable animations when user prefers-reduced-motion
#34081
🐛 Stories: Disable animations when user prefers-reduced-motion
#34081
Conversation
Hey @gmajoulet, @newmuis! These files were changed:
Hey @processprocess! These files were changed:
Hey @Enriqe! These files were changed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome to me. Thanks for making this fix so fast and setting up/updating the tests for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you cleanup the maybeFinishAnimations_
code?
It's used in vertical rendering and called in |
cc @kristoferbaxter for owners approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice fix! one comment, plz fix before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work!
@@ -26,6 +26,7 @@ import {Services} from '../../../src/services'; | |||
import {closest, whenUpgradedToCustomElement} from '../../../src/dom'; | |||
import {deepEquals} from '../../../src/json'; | |||
import {dev, user} from '../../../src/log'; | |||
import {prefersReducedMotion} from '../../../src/utils/media-query-props'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Potentially followup with moving this to src/core
.
…project#34081) Native animations do not run with `prefers-reduced-motion`. Disable the `AnimationManager` altogether so that pre-animation styling is not applied. Elements correctly remain in their end-state when the animation itself doesn't run. Fixes ampproject#34062
Native animations will not run with
prefers-reduced-motion
. Disable theAnimationManager
altogether so that pre-animation styling is not applied, and elements correctly remain in their end-state.Fixes #34062