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

Reset for prefers-reduced-motion should not be global #3417

Open
sydk-adhoc opened this issue Jan 30, 2025 · 0 comments
Open

Reset for prefers-reduced-motion should not be global #3417

sydk-adhoc opened this issue Jan 30, 2025 · 0 comments

Comments

@sydk-adhoc
Copy link

Describe the bug
The CMSDS resets for users who enable prefers-reduced-motion are global, and can negatively affect 3rd-party libraries and components.

To Reproduce
In the process of upgrading from Mgov CMSDS v8 to v10 on MCT, we found that updates having to do with prefers-reduced-motion adversely affected our toast implementation using react-toastify.

When prefers-reduced-motion is on (set to reduce), toasts were disappearing after a matter of milliseconds instead of the 5-second default we've been using. We had to implement a workaround to deal with this issue (a fix which abides by the resets but sidesteps react-toastify's autoClose option, which is what broke).

We propose that the reset shouldn't be global, but instead applied selectively to components within the CMSDS component-class namespace (ds-c-).

Expected behavior
CMSDS resets should, ideally, not adversely affect 3rd-party libraries / components. Many libraries have their own way of implementing a prefers-reduced-motion option, and it should be left to the library or consuming application to implement.

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.2, Windows 11
  • Browsers: Chrome, Safari, Firefox, Edge
  • Versions: Latest

Smartphone (please complete the following information):

  • Not tested

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant