Repository navigation
Stylelint: Ignore more vertical-only properties in the logical CSS rule - #87689
Merged
Merged
Conversation
border-top/bottom-color/style/width and scroll-padding-top/bottom don't depend on writing direction, like the border-top and scroll-margin-top properties already ignored.
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.73 MB
|
simison
marked this pull request as ready for review
November 30, 2026 21:15
This was referenced Nov 30, 2026
mirka
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds vertical-only longhands to the ignore list of
logical-css/require-logical-properties:border-top-color,border-top-style,border-top-widthborder-bottom-color,border-bottom-style,border-bottom-widthscroll-padding-top,scroll-padding-bottomWhy?
The rule already ignores vertical properties that don't depend on writing direction, such as
border-top,margin-topandscroll-margin-top, so it only covers the horizontal axis. These longhands were missing, so the rule flagged them even though they behave the same in LTR and RTL.While analysing 6 months of trunk commits for #87686, these properties caused 8 of the 145 flags (in 7 commits), and none of them were RTL issues. With #87686 enabling the rule everywhere, they would cause even more noise.
How?
Extends the
ignorelist intools/stylelint/config.js. Horizontal properties (border-left-color,scroll-padding-left…) and corner radii (border-top-left-radius…) are still flagged.Testing Instructions
npm run lint:csspasses. No inline disables become unneeded (reportNeedlessDisablesis on).packages/ui/src/button/style.module.css, add.foo { border-top-color: #000; scroll-padding-bottom: 1px; margin-left: 1px; }and runnpm run lint:css. Onlymargin-leftis flagged bylogical-css/require-logical-properties.Use of AI Tools
Drafted with Claude Code; reviewed by me.