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

Block Directory: Standardize reduced motion handling using media queries #68419 #68420

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Dec 31, 2024

WIP

Part of: #68282

What?

Refactors animation and transition styles to use @media not (prefers-reduced-motion) for improved accessibility, ensuring a better experience for users who prefer reduced motion.

Why?

Currently, many parts of the codebase do not consider users' motion preferences, which may not be ideal for those with reduced motion settings. This PR addresses and fixes that issue.

How?

This PR updates the old reduce-motion mixin implementation and addresses missing cases to adopt the new approach outlined in the parent issue.

@media not ( prefers-reduced-motion ) {
      transition: box-shadow 0.1s linear;
}

Screenshots or screencast

Screen.Recording.2024-12-31.at.2.43.17.PM.mov

@im3dabasia im3dabasia marked this pull request as ready for review December 31, 2024 09:16
Copy link

github-actions bot commented Dec 31, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@im3dabasia
Copy link
Contributor Author

Hey @t-hamano , Could you please review my PR when you have a moment.

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Feature] Block Directory Related to the Block Directory, a repository of block plugins labels Jan 11, 2025
@t-hamano t-hamano self-requested a review January 11, 2025 04:13
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM!

Could you rebase this PR to make sure it passes Storybook CI?

@im3dabasia
Copy link
Contributor Author

Could you rebase this PR to make sure it passes Storybook CI?

Thank you @t-hamano , I have rebased the PR and all the tests have passed. Good to merge into trunk

@t-hamano t-hamano merged commit 9641b36 into WordPress:trunk Jan 13, 2025
62 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.1 milestone Jan 13, 2025
Gulamdastgir-Momin pushed a commit to Gulamdastgir-Momin/gutenberg that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Directory Related to the Block Directory, a repository of block plugins [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants