-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add stylelint rule to disallow the order
CSS property
#61243
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Note: this PR touches two files in the |
Size Change: 0 B Total Size: 1.74 MB ℹ️ View Unchanged
|
@WordPress/gutenberg-core I'd appreciate a review, when you have a chance 🙇🏽♂️ |
WFM |
Thanks all for the review. |
Fixes #61241
What?
This PR aims to prevent the usage of the
order
CSS property.Why?
The
order
CSS property has a significant impact on accessibility and its usage must be prevented. In the very rare cases where its usage is appropriate, that should be a conscious choice of contributors and they should be required to add a disable comment with a disable reason.How?
order
CSS property to theproperty-disallowed-list
rule.Avoid the order property. For accessibility reasons, visual, reading, and DOM order must match. Only use the order property when it does not affect reading order, meaning, and interaction
stylelint-disable*
comments by addint the config"reportDescriptionlessDisables": true
.Testing Instructions
npm run lint:css
in your terminal, in the project root.order: 1;
.npm run lint:css
again.stylelint-disable
comments are meaningful and appropriate.Testing Instructions for Keyboard
Screenshots or screencast