Skip to content

feat(css): add support for SCSS @each at-rule (#9418)#9419

Merged
denbezrukov merged 2 commits intomainfrom
db/scss-at-rule-3
Mar 9, 2026
Merged

feat(css): add support for SCSS @each at-rule (#9418)#9419
denbezrukov merged 2 commits intomainfrom
db/scss-at-rule-3

Conversation

@denbezrukov
Copy link
Copy Markdown
Contributor

Summary

Adds SCSS @each at-rule support to the CSS parser and formatter.

Test Plan

  • Added parser coverage for valid and invalid SCSS @each
  • Added formatter coverage for SCSS @each
  • Ran:
    • cargo test -p biome_css_parser
    • cargo test -p biome_css_formatter

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 628595f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-CSS Language: CSS and super languages L-Grit Language: GritQL labels Mar 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 53071 53071 0
Passed 51851 51851 0
Failed 1178 1178 0
Panics 42 42 0
Coverage 97.70% 97.70% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 38 38 0
Passed 37 37 0
Failed 1 1 0
Panics 0 0 0
Coverage 97.37% 97.37% 0.00%

markdown/commonmark

Test result main count This PR count Difference
Total 652 652 0
Passed 652 652 0
Failed 0 0 0
Panics 0 0 0
Coverage 100.00% 100.00% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5466 5466 0
Passed 1915 1915 0
Failed 3551 3551 0
Panics 0 0 0
Coverage 35.03% 35.03% 0.00%

ts/babel

Test result main count This PR count Difference
Total 636 636 0
Passed 568 568 0
Failed 68 68 0
Panics 0 0 0
Coverage 89.31% 89.31% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18875 18875 0
Passed 13014 13014 0
Failed 5860 5860 0
Panics 1 1 0
Coverage 68.95% 68.95% 0.00%

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 9, 2026

Merging this PR will not alter performance

✅ 29 untouched benchmarks
⏩ 187 skipped benchmarks1


Comparing db/scss-at-rule-3 (628595f) with main (744fe78)

Open in CodSpeed

Footnotes

  1. 187 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5def41fd-c3b3-42c6-985b-20fae59aad13

📥 Commits

Reviewing files that changed from the base of the PR and between 061daa3 and 628595f.

📒 Files selected for processing (2)
  • crates/biome_css_parser/src/syntax/scss/at_rule/each_at_rule.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/mod.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_css_parser/src/syntax/scss/at_rule/mod.rs

Walkthrough

Adds full SCSS @each support across parser, lexer, formatter and tests. Introduces ScssEachAtRule and ScssEachBindingList AST kinds (codegen updates), recognises "each" as a keyword in the lexer, implements parsing (parse_scss_each_at_rule) with recovery and separated-list support, wires the parser into at-rule dispatch, adds formatters and AsFormat/IntoFormat impls, updates formatter unions and formatter modules, and adds positive and negative tests for @each behaviour.

Possibly related PRs

Suggested labels

L-SCSS

Suggested reviewers

  • ematipico
  • siketyan
  • dyc3
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main feature being added: SCSS @each at-rule support to the CSS parser and formatter.
Description check ✅ Passed The description accurately summarises the changes (adding SCSS @each at-rule support) and documents the test plan with specific test coverage and cargo commands executed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch db/scss-at-rule-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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: internal tools L-CSS Language: CSS and super languages L-Grit Language: GritQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants