feat(css): update CSS properties order to align with stylelint-config-recess-order@7.4.0#8234
Conversation
🦋 Changeset detectedLatest commit: a1d07ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a changeset entry for a minor version bump and expands CSS property ordering in Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-11-24T18:04:42.146ZApplied to files:
📚 Learning: 2025-11-24T18:04:42.146ZApplied to files:
📚 Learning: 2025-11-24T18:04:42.146ZApplied to files:
📚 Learning: 2025-11-24T18:04:42.146ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/biome_css_analyze/src/order.rs (1)
146-146: Double‑check a couple of property names for future youTwo tiny nits that might save head‑scratching later:
- Line 146: the commented‑out
scroll-behaviouruses British spelling, whereas the CSS property isscroll-behavior– worth confirming you’re mirroring the upstream config intentionally rather than the spec spelling.- Lines 491–492:
view-transition-classisn’t a property I recognise from the current CSS view transitions spec; if this comes solely from stylelint-config-recess-order, consider adding a short comment or TODO so we remember why it’s here and that it might be non-standard.Neither blocks the PR, but a quick sanity check against MDN/specs or the upstream config would be prudent.
Also applies to: 490-492
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/real-owls-glow.md(1 hunks)crates/biome_css_analyze/src/order.rs(19 hunks)
🔇 Additional comments (2)
crates/biome_css_analyze/src/order.rs (1)
10-523: PROPERTY_ORDER sync looks consistent with upstream intentThe expanded list and grouping look coherent with the MDN modules and the existing invariants; keeping the tests unchanged here is a nice way to guard against duplicate/unknown props and ordering regressions.
.changeset/real-owls-glow.md (1)
1-5: Changeset message matches the actual changeNice, this clearly documents the patch‑level impact and ties it to the stylelint-config-recess-order@7.4.0 sync.
CodSpeed Performance ReportMerging #8234 will not alter performanceComparing Summary
Footnotes
|
b2aab53 to
feedfd7
Compare
955dabb to
83dea71
Compare
|
I reset the test changes. Adding snapshot tests for specific properties doesn't seem necessary; the unit tests in order.rs already cover property mismatch cases well. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/biome_css_analyze/src/order.rs (1)
3-14: PROPERTY_ORDER sync and handling of unsupported properties look solidThe expanded constant and the commented‑out entries for things Biome doesn’t support yet (
"composes"etc.) are a clean way to track upstream without breaking our own grammar; the invariants are all guarded by the tests below. As a small future‑you aid, you might want to name‑dropstylelint-config-recess-order@7.4.0in the doc comment so it’s obvious which upstream version this list mirrors.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/real-owls-glow.md(1 hunks)crates/biome_css_analyze/src/order.rs(19 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .changeset/real-owls-glow.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Use the Rustdbg!()macro for debugging output during test execution, and pass the--show-outputflag tocargo testto display debug output.
Use snapshot testing with theinstacrate for testing in Rust projects. Accept or reject snapshots usingcargo insta accept,cargo insta reject, orcargo insta review.
Write doc comments as doc tests in Rust using code blocks with assertions that will be executed during the testing phase.
Use rustdoc inline documentation for rules, assists, and their options. Create corresponding documentation PRs for other documentation updates against thenextbranch of the website repository.
Set theversionmetadata field in linter rule implementations to'next'for newly created rules. Update this field to the new version number when releasing a minor or major version.
Files:
crates/biome_css_analyze/src/order.rs
🧠 Learnings (1)
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule option fields should use 'Box<[Box<str>]>' instead of 'Vec<String>' for array types to save memory
Applied to files:
crates/biome_css_analyze/src/order.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Test Node.js API
- GitHub Check: Documentation
- GitHub Check: Check Dependencies
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: autofix
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_css_formatter)
🔇 Additional comments (5)
crates/biome_css_analyze/src/order.rs (5)
86-136: Box sizing / intrinsic size / containment grouping is coherentPlacing the
contain-intrinsic-*properties immediately after the core sizing props, and then introducing the dedicated Containment block before Overflow, keeps the layout story readable and doesn’t disturb any of the shorthand/longhand orstart/endinvariants enforced by the tests.
157-245: Fonts, colour palettes, and text‑layout additions are wired in sensiblyThe new
font-synthesis*entries under Fonts, the palette props (base-palette,override-colors,font-palette) under Colours, and the extra text controls (hyphenate-character,text-wrap-*,white-space-collapse) all sit in the right modules. Withtest_no_unknown_properties_in_order_listbacking this, I don’t see any ordering or naming pitfalls here.
254-339: UI, colour adjustment, ruby, scroll snap, and imagery sections look consistentThe additions for basic UI (
accent-color, navigation props), colour adjustment (forced-color-adjust,print-color-adjust), ruby layout, scroll snap/margins, scrollbar styling, and image behaviour are all grouped where you’d expect them and keep the logical flow from interaction → layout → scrolling → imagery intact. No red flags from the linter‑rule perspective.
339-443: Backgrounds/borders, compositing, masking, shapes, and writing‑mode tweaks are tidyExtending the visual effects area with
clip-rule,mask-type, the Shapes block (shape-*), and the Writing modes additions (direction,unicode-bidi,text-orientation,text-combine-upright) fits neatly with the surrounding comments. This all remains pure data; the existing duplicate and vendor‑prefix tests will catch any future mishaps.
450-533: SVG, transforms, transitions, view transitions, animations, and motion‑path coverage looks greatThe SVG presentation additions (
marker,paint-order,text-rendering), transform‑related properties (transform-box,transform-style,backface-visibility), and the new modules for view transitions, animation composition, motion path, andwill-changeround out the modern rendering stack nicely. You’ve also not introduced any new"start"substrings without matching"end"entries, so thestart/endordering test should stay happy.
9a7f385 to
6ba5709
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/biome_css_analyze/src/order.rs (1)
145-149: Tiny nit: spelling of the commentedscroll-behaviourpropertyUltra‑minor and non‑blocking: the canonical CSS property is
scroll-behavior(without the “u”). If this commented‑out entry is meant to mirror the actual property name from upstream/spec rather than British spelling, you might want to tweak it for future clarity before it ever gets uncommented.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/real-owls-glow.md(1 hunks)crates/biome_css_analyze/src/order.rs(19 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .changeset/real-owls-glow.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Use the Rustdbg!()macro for debugging output during test execution, and pass the--show-outputflag tocargo testto display debug output.
Use snapshot testing with theinstacrate for testing in Rust projects. Accept or reject snapshots usingcargo insta accept,cargo insta reject, orcargo insta review.
Write doc comments as doc tests in Rust using code blocks with assertions that will be executed during the testing phase.
Use rustdoc inline documentation for rules, assists, and their options. Create corresponding documentation PRs for other documentation updates against thenextbranch of the website repository.
Set theversionmetadata field in linter rule implementations to'next'for newly created rules. Update this field to the new version number when releasing a minor or major version.
Files:
crates/biome_css_analyze/src/order.rs
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/*.rs : Set the `version` metadata field in linter rule implementations to `'next'` for newly created rules. Update this field to the new version number when releasing a minor or major version.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The 'declare_lint_rule!' macro must include a 'version' field set to 'next' to allow flexibility for the actual release version
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules ported from other ecosystems should include a 'sources' field in the 'declare_lint_rule!' macro with RuleSource metadata (e.g., '::ESLint')
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_css_analyze/lib/src/**/!(mod).rs : CSS rules that report non-standardized or unknown concepts should use the 'noUnknown<Concept>' naming convention (e.g., `noUnknownUnit`)
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Deprecated rules must include a 'deprecated' field in the 'declare_lint_rule!' macro with the reason for deprecation
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule option fields should use 'Box<[Box<str>]>' instead of 'Vec<String>' for array types to save memory
Applied to files:
crates/biome_css_analyze/src/order.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Check Dependencies
- GitHub Check: autofix
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_parser)
🔇 Additional comments (1)
crates/biome_css_analyze/src/order.rs (1)
10-533: ExpandedPROPERTY_ORDERlooks consistent and well‑guarded by testsThe new properties and grouping comments line up nicely with the spec modules and the intent of mirroring
stylelint-config-recess-order, and the existing tests (no shorthand-after-longhand, no vendor prefixes, no duplicates, no unknown properties, start/end ordering) still provide solid safety rails over the enlarged list. I don’t see any behavioural regressions here; happy with this as‑is.
There was a problem hiding this comment.
Awesome, now the PR is more reasonable! However, we should add tests :)
"All tests passed" isn't reasonable because we're adding new stuff and this new stuff hasn't been tested, so it's expected that the current tests pass... because we aren't testing the new stuff!
Please add new tests that cover the new properties
…-recess-order@7.4.0
6ba5709 to
a1d07ed
Compare
Sure, I've added the tests. You might notice that some blocks don't have a safe fix; this is because they contain a shorthand property, which is expected behavior. |
Summary
I updated the PROPERTY_ORDER list to match the upstream changes.
Note: Some properties (such as composes, font-smooth, nav-index, etc.) are commented out because Biome does not yet support them.
Test Plan
Updated snapshot tests
Docs