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

Respect prefers-reduced-motion in zen-styles #6466

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

TimStewartJ
Copy link

@TimStewartJ TimStewartJ commented Mar 14, 2025

Currently there are some animations in the browser which do not respect prefers reduced motion.

My particular use case is Zen over RDP - the animations end up pretty choppy in this scenario so it'd be nice if they followed the OS level preference for reduced motion.

Add `@media (prefers-reduced-motion: reduce)` queries to respect reduced motion preferences.

* **zen-animations.css**: Wrap all `@keyframes` rules inside the `@media` query to disable animations for users who prefer reduced motion.
* **zen-browser-ui.css**: Add `@media (prefers-reduced-motion: reduce)` query to disable `zen-main-app-wrapper-animation`.
* **zen-panel-ui.css**: Add `@media (prefers-reduced-motion: reduce)` query to disable `zen-jello-animation` for panel content.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement labels Mar 14, 2025
@@ -3,6 +3,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@media (prefers-reduced-motion: reduce) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not just use not for the selectors at the bottom to avoid duplication?

Copy link
Author

Choose a reason for hiding this comment

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

Oh sorry I didn't mean to open this PR early, I was just trying out the new Copilot Workspaces feature - I'll continue working on this as time allows

@TimStewartJ TimStewartJ marked this pull request as draft March 17, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants