Skip to content

feat(css): allow scss declarations in @page blocks#9139

Merged
denbezrukov merged 2 commits intonextfrom
db/scss-page-declarations
Feb 18, 2026
Merged

feat(css): allow scss declarations in @page blocks#9139
denbezrukov merged 2 commits intonextfrom
db/scss-page-declarations

Conversation

@denbezrukov
Copy link
Contributor

Summary

Allow SCSS declarations inside @page blocks, including nested property declarations (font:
{ ... }) and SCSS variables in page margin at-rules (for example @top-left).

Test Plan

  1. cargo test -p biome_css_parser
  2. cargo test -p biome_css_formatter

@changeset-bot
Copy link

changeset-bot bot commented Feb 18, 2026

⚠️ No Changeset found

Latest commit: 26261a7

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 labels Feb 18, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 18, 2026

Merging this PR will not alter performance

✅ 29 untouched benchmarks
⏩ 126 skipped benchmarks1


Comparing db/scss-page-declarations (26261a7) with next (7a36937)

Open in CodSpeed

Footnotes

  1. 126 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
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

This PR extends SCSS support within CSS @page at-rules by introducing two new declaration variants (ScssDeclaration and ScssNestingDeclaration) to the grammar. The parser has been updated to handle SCSS nesting declarations in page at-rule contexts, the formatter routes both variants through their respective format methods, and bogus block handling has been added. Test files demonstrate the new functionality with variable scoping and nested properties in @page rules.

Possibly related PRs

Suggested reviewers

  • siketyan
  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding SCSS declaration support to @page blocks, which aligns with all modified files.
Description check ✅ Passed The description clearly outlines the feature (SCSS declarations in @page blocks) and includes a test plan, directly relating to the changeset.

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

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch db/scss-page-declarations

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.

@denbezrukov denbezrukov merged commit 9f744da into next Feb 18, 2026
15 checks passed
@denbezrukov denbezrukov deleted the db/scss-page-declarations branch February 18, 2026 21:53
denbezrukov added a commit that referenced this pull request Feb 19, 2026
@Netail Netail added the L-SCSS Language: SCSS label Feb 24, 2026
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 L-SCSS Language: SCSS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants