Closed ty2k closed 2 months ago
This updates the Switch component to add prefers-reduced-motion rules to its transition style rules. This has the effect of removing the animation when a user has set up their browser (or OS) to reduce the amount of motion they see.
prefers-reduced-motion
transition
See MDN's prefers-reduced-motion User Preferences for instructions on changing this setting to test.
Chrome in macOS with "Reduce motion" turned on: https://github.com/user-attachments/assets/0fde3d9e-203b-4ec1-9f19-21540cc4aeda
Turned off (default): https://github.com/user-attachments/assets/7339dbb6-e00f-4667-9e8e-57304df10eaa
This updates the Switch component to add
prefers-reduced-motion
rules to itstransition
style rules. This has the effect of removing the animation when a user has set up their browser (or OS) to reduce the amount of motion they see.See MDN's prefers-reduced-motion User Preferences for instructions on changing this setting to test.
Chrome in macOS with "Reduce motion" turned on: https://github.com/user-attachments/assets/0fde3d9e-203b-4ec1-9f19-21540cc4aeda
Turned off (default): https://github.com/user-attachments/assets/7339dbb6-e00f-4667-9e8e-57304df10eaa