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

Better check for prefers-reduced-motion #2223

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Better check for prefers-reduced-motion #2223

merged 2 commits into from
Sep 9, 2024

Conversation

r100-stack
Copy link
Member

Changes

Based on #2001 (comment). Makes the following change for a cleaner and safer prefers-reduced-motion check:

- getWindow()?.matchMedia('(prefers-reduced-motion: no-preference)')?.matches;
+ useMediaQuery('(prefers-reduced-motion: no-preference)');

Testing

Tests still passing.

Docs

N/A since internal change.

@r100-stack r100-stack self-assigned this Sep 6, 2024
@r100-stack r100-stack mentioned this pull request Sep 6, 2024
@r100-stack r100-stack marked this pull request as ready for review September 6, 2024 13:02
@r100-stack r100-stack requested a review from a team as a code owner September 6, 2024 13:02
@r100-stack r100-stack requested review from mayank99 and smmr-dn and removed request for a team September 6, 2024 13:02
@r100-stack r100-stack enabled auto-merge (squash) September 9, 2024 20:02
@r100-stack r100-stack merged commit 43fd75b into main Sep 9, 2024
16 checks passed
@r100-stack r100-stack deleted the r/motion-ok branch September 9, 2024 20:11
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.

3 participants