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

feat: [#1724] Add prefers-reduced-motion support #1725

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

mwdiaz
Copy link
Contributor

@mwdiaz mwdiaz commented Feb 11, 2025

As mentioned in #1724, this is an implementation we're using locally via pnpm patch and it's been working well. I modeled the change after work done previously in #354, so hopefully I'm not too off base. I did consider making the prefersReducedMotion setting a boolean, but I think it makes more sense to accept the valid string values for the setting, which is also more future proof if they ever decide to extend the spec to accept more values.

Thanks for all the work on this project!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This is modeled after previous work done for `prefers-color-scheme`.
Like `prefers-color-scheme`, I've added this as a device setting that
can be a string, one of "no-preference" (the default) or "reduce".
@mwdiaz mwdiaz requested a review from capricorn86 as a code owner February 11, 2025 19:02
Copy link
Owner

@capricorn86 capricorn86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @mwdiaz! ⭐

I pushed in a fix to check if settings exist as it can potentially be null during tear down. It seems like it was missed before as well.

@capricorn86 capricorn86 merged commit 2f709e4 into capricorn86:master Feb 11, 2025
3 checks passed
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.

None yet

2 participants