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

Change prefers-reduced-motion media query to no-preference #19

Open
joppekroon opened this issue Feb 24, 2023 · 1 comment
Open

Change prefers-reduced-motion media query to no-preference #19

joppekroon opened this issue Feb 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@joppekroon
Copy link

It is great that the animations don't work when the user has indicated that they prefer no motion. However the even better practice is to only have animations when the user has indicated that they have no preference with respect to motion.

Great:

@media (prefers-reduced-motion: reduce) {
  /* Disable all the animations */
} 

Better:

@media (prefers-reduced-motion: no-preference) {
  /* All the animation code */
}

This is a safer default as users that are affected by motion and are on a system on which they cannot indicate this preference, will not have the motion applied and thus will not experience any ill effects.

It is also arguably a simpler approach, as all the animation code will be sequestered into the media query, as opposed to the animation code having to be disabled.

@AlfieJones
Copy link
Owner

Thanks for the suggestion. I like this a lot and will add it into the next version. I don't have a release date yet but development is very far along so it wont be long

@AlfieJones AlfieJones added the enhancement New feature or request label Feb 27, 2023
@AlfieJones AlfieJones reopened this Feb 27, 2023
@AlfieJones AlfieJones mentioned this issue Mar 13, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants