Skip to content

refactor(css): rename scss declaration and module access syntax#10014

Merged
denbezrukov merged 4 commits into
mainfrom
db/scss-interpolation-5
Apr 17, 2026
Merged

refactor(css): rename scss declaration and module access syntax#10014
denbezrukov merged 4 commits into
mainfrom
db/scss-interpolation-5

Conversation

@denbezrukov

Copy link
Copy Markdown
Contributor

This PR was created with AI assistance (Codex).

Summary

Renames the SCSS variable, variable-declaration, and module-access syntax families to match the grammar
more accurately:

  • ScssIdentifier -> ScssVariable
  • ScssNamespacedIdentifier -> ScssNamespacedVariable
  • ScssDeclaration -> ScssVariableDeclaration
  • AnyScssDeclarationName -> AnyScssVariableDeclarationName
  • ScssQualifiedName -> ScssModuleMemberAccess

Test Plan

Green CI.

@changeset-bot

changeset-bot Bot commented Apr 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4830749

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-Linter Area: linter 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 Apr 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 53181 53181 0
Passed 51961 51961 0
Failed 1178 1178 0
Panics 42 42 0
Coverage 97.71% 97.71% 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 5467 5467 0
Passed 1915 1915 0
Failed 3552 3552 0
Panics 0 0 0
Coverage 35.03% 35.03% 0.00%

ts/babel

Test result main count This PR count Difference
Total 640 640 0
Passed 569 569 0
Failed 71 71 0
Panics 0 0 0
Coverage 88.91% 88.91% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18876 18876 0
Passed 13014 13014 0
Failed 5861 5861 0
Panics 1 1 0
Coverage 68.94% 68.94% 0.00%

@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR renames and repurposes several SCSS AST kinds across the grammar, parser, formatter, grit mappings and generated formatter code: ScssDeclarationScssVariableDeclaration, ScssIdentifierScssVariable, ScssQualifiedNameScssModuleMemberAccess, and ScssNamespacedIdentifierScssNamespacedVariable. Parsing entry points, predicates and completion kinds were updated to the new names, formatter match arms and generated format-rule registrations were adjusted to the variable/module-member variants, and grit native-kind/slot mappings and codegen inputs were updated to match. A related CSS analyzer change treats SCSS variable declarations as UnknownKind for sorted-property ordering.

Possibly related PRs

Suggested reviewers

  • dyc3
  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main refactoring effort: renaming SCSS syntax node types to better reflect their purpose (declarations, variables, and module access patterns).
Description check ✅ Passed The description clearly outlines the renaming changes across five SCSS-related syntax families and provides a test plan, directly relating to the extensive refactoring evident in the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch db/scss-interpolation-5

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (4)
crates/biome_css_parser/src/syntax/at_rule/page.rs (1)

33-34: Minor doc wording nit.

Now that the SCSS branch only routes variable declarations, the doc comment could be tightened from "SCSS declarations" to "SCSS variable declarations" to match the narrower behaviour — purely optional.

✏️ Proposed tweak
-/// Parses `@page` and allows SCSS declarations inside the block so variables can be
-/// scoped to the at-rule body.
+/// Parses `@page` and allows SCSS variable declarations inside the block so
+/// variables can be scoped to the at-rule body.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/at_rule/page.rs` around lines 33 - 34,
Update the doc comment that currently reads "Parses `@page` and allows SCSS
declarations inside the block so variables can be scoped to the at-rule body."
to more precisely say "Parses `@page` and allows SCSS variable declarations
inside the block so variables can be scoped to the at-rule body." Locate the
comment above the `@page` parser in this module (the doc for the `@page` at-rule
parser that contains the phrase "SCSS declarations") and replace "SCSS
declarations" with "SCSS variable declarations".
crates/biome_css_parser/src/syntax/value/function/call.rs (1)

150-156: Optional: refresh the diagnostic wording?

The AST node is now ScssModuleMemberAccess, but the error on Line 154 still calls these "SCSS qualified function names". Either reading is defensible (the Sass concept vs. the node name), so feel free to leave it — just flagging in case you want full consistency with the rename theme of the PR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/value/function/call.rs` around lines 150 -
156, The diagnostic message uses "SCSS qualified function names" but the AST
node was renamed to ScssModuleMemberAccess; update the scss_only_syntax_error
invocation so the wording matches the node/name (e.g., "SCSS module member
access" or "SCSS module-qualified function names") in the call inside the
CssSyntaxFeatures::Scss.parse_exclusive_syntax closure (the code path using
context.is_scss_exclusive_syntax_allowed() and
is_at_scss_module_member_access(p)), replacing the string passed to
scss_only_syntax_error to keep message and node-name consistent.
crates/biome_css_parser/src/syntax/mod.rs (1)

22-30: Rename looks clean, but the import block ordering got a bit shuffled.

Nit: items like is_at_scss_variable_declaration are now interleaved between is_at_scss_function and is_at_scss_interpolated_function_or_value, which breaks the old roughly-alphabetical grouping and rustfmt probably won't rescue it. Purely cosmetic — feel free to ignore if just f is happy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/mod.rs` around lines 22 - 30, The import
list has been shuffled and breaks the previous roughly-alphabetical grouping;
reorder the items in the use crate::syntax::scss::... list so related symbols
are grouped/alphabetized (e.g., put is_at_scss_function,
is_at_scss_interpolated_function_or_value, is_at_scss_interpolated_string,
is_at_scss_module_member_access, is_at_scss_parent_selector_value,
is_at_scss_variable, is_at_scss_variable_declaration together in proper
alphabetical order) so the block is tidy and rustfmt/just f will keep it stable.
crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs (1)

1-78: File name is now a bit of a false advertisement.

Optional: identifier.rs no longer contains anything identifier-flavoured — just ScssVariable / ScssNamespacedVariable. Renaming the file to variable.rs (and perhaps the parent module identifiers/ to variables/ or similar) would close the loop on the rename; otherwise future readers will keep asking where the "identifier" actually is. Happy to defer to a follow-up.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs` around
lines 1 - 78, The file identifier.rs now only contains SCSS variable logic
(is_at_scss_variable, parse_scss_variable, is_at_scss_namespaced_variable,
parse_scss_namespaced_variable) and should be renamed to variable.rs to reflect
its contents; update any module declarations and imports that reference the old
identifiers module name (e.g. change mod/uses of identifiers::identifier or
identifiers to variables::variable or variables) and adjust parent module name
if you choose to rename identifiers/ to variables/—ensure all references to the
old symbols are updated so the compiler sees the new module path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@crates/biome_css_parser/src/syntax/at_rule/page.rs`:
- Around line 33-34: Update the doc comment that currently reads "Parses `@page`
and allows SCSS declarations inside the block so variables can be scoped to the
at-rule body." to more precisely say "Parses `@page` and allows SCSS variable
declarations inside the block so variables can be scoped to the at-rule body."
Locate the comment above the `@page` parser in this module (the doc for the
`@page` at-rule parser that contains the phrase "SCSS declarations") and replace
"SCSS declarations" with "SCSS variable declarations".

In `@crates/biome_css_parser/src/syntax/mod.rs`:
- Around line 22-30: The import list has been shuffled and breaks the previous
roughly-alphabetical grouping; reorder the items in the use
crate::syntax::scss::... list so related symbols are grouped/alphabetized (e.g.,
put is_at_scss_function, is_at_scss_interpolated_function_or_value,
is_at_scss_interpolated_string, is_at_scss_module_member_access,
is_at_scss_parent_selector_value, is_at_scss_variable,
is_at_scss_variable_declaration together in proper alphabetical order) so the
block is tidy and rustfmt/just f will keep it stable.

In `@crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs`:
- Around line 1-78: The file identifier.rs now only contains SCSS variable logic
(is_at_scss_variable, parse_scss_variable, is_at_scss_namespaced_variable,
parse_scss_namespaced_variable) and should be renamed to variable.rs to reflect
its contents; update any module declarations and imports that reference the old
identifiers module name (e.g. change mod/uses of identifiers::identifier or
identifiers to variables::variable or variables) and adjust parent module name
if you choose to rename identifiers/ to variables/—ensure all references to the
old symbols are updated so the compiler sees the new module path.

In `@crates/biome_css_parser/src/syntax/value/function/call.rs`:
- Around line 150-156: The diagnostic message uses "SCSS qualified function
names" but the AST node was renamed to ScssModuleMemberAccess; update the
scss_only_syntax_error invocation so the wording matches the node/name (e.g.,
"SCSS module member access" or "SCSS module-qualified function names") in the
call inside the CssSyntaxFeatures::Scss.parse_exclusive_syntax closure (the code
path using context.is_scss_exclusive_syntax_allowed() and
is_at_scss_module_member_access(p)), replacing the string passed to
scss_only_syntax_error to keep message and node-name consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fe66401b-eddc-46a4-b650-9776ec68768d

📥 Commits

Reviewing files that changed from the base of the PR and between 131019e and e141e3b.

⛔ Files ignored due to path filters (123)
  • crates/biome_css_factory/src/generated/node_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_factory/src/generated/syntax_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/function/scss_qualified_function.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/debug.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/each.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/else.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/error.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/for.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/forward.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/function.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/if.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/include.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/media-interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/mixin.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/page-selector-like-declaration.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/supports-interpolated-property-missing-colon.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/supports-interpolated-property-missing-value.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/use.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/at-rule/while.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/duplicate-modifier-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/interpolated-selector-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/invalid-modifier.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-modifier.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-semicolon-boundary-matrix.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-semicolon-namespace-selector-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-semicolon-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-semicolon-relative-selector-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-semicolon-selector-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/missing-value.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/declaration/modifier-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/arglist-ellipsis-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/ellipsis.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/list-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/missing-expressions.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/expression/paren-map-missing-value.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/recovery/map-missing-value.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/selector/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/bracketed-mixed-separators.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/bracketed-recovery-separators.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/function-args-block-end-recovery.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/interpolation-non-string-quote.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/qualified-name-dollar-function.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/string-interpolation-invalid-escape.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/string-interpolation-invalid-string-text.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/error/scss/value/string-interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/content.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/debug.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/declaration-block-interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/each.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/else.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/error.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/extend.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/for.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/forward.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/function.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/if.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/import.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/include.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/media-interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/mixin.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/page.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/return.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/supports-expression.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/use.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/warn.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/at-rule/while.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/comment/multiline.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/comment/nested.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/ambiguous-selector-vs-nesting.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/duplicate-modifier.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/global-flag.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/namespace-properties.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/namespaced-function.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/namespaced-variable.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/nested-properties-complex-value.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/nested-variables.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/declaration/semicolon-eof.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/complex-expressions.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/core.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/edge-cases-extra.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/fallback-values.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/keyword-argument-context.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/map-key-colon.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/map-vs-paren-list.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/expression/precedence.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/selector/interpolated-string-values.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/selector/interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/binary-operators.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/bracketed-values.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/builtin-modules.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/function-args-inline.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/function-call.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/functions-advanced.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/if-disambiguation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/interpolated-minus-line-break.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/keyword-args-ellipsis.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/list-advanced.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/list-empty-elements.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/list-important-item.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/list-space.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/list.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/map-advanced.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/map-expression-key.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/map-list-access.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/map.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/number.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/parent-and-colon-values.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/plain-vs-interpolated-string.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/qualified-names.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/signed-numeric-operator.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/string-interpolation-nested-strings.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/string-interpolation.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/unary-operator-chain.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/unary-operators.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_parser/tests/css_test_suite/ok/scss/value/url.scss.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_syntax/src/generated/kind.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_syntax/src/generated/macros.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_syntax/src/generated/nodes.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_syntax/src/generated/nodes_mut.rs is excluded by !**/generated/**, !**/generated/** and included by **
📒 Files selected for processing (47)
  • crates/biome_css_analyze/src/assist/source/use_sorted_properties.rs
  • crates/biome_css_formatter/src/css/any/declaration.rs
  • crates/biome_css_formatter/src/css/any/declaration_or_at_rule.rs
  • crates/biome_css_formatter/src/css/any/declaration_or_rule.rs
  • crates/biome_css_formatter/src/css/any/function_name.rs
  • crates/biome_css_formatter/src/css/any/page_at_rule_item.rs
  • crates/biome_css_formatter/src/css/any/root_item.rs
  • crates/biome_css_formatter/src/css/any/value.rs
  • crates/biome_css_formatter/src/generated.rs
  • crates/biome_css_formatter/src/scss/any/declaration_name.rs
  • crates/biome_css_formatter/src/scss/any/include_target.rs
  • crates/biome_css_formatter/src/scss/any/mod.rs
  • crates/biome_css_formatter/src/scss/any/module_member.rs
  • crates/biome_css_formatter/src/scss/any/variable_declaration_name.rs
  • crates/biome_css_formatter/src/scss/auxiliary/mod.rs
  • crates/biome_css_formatter/src/scss/auxiliary/module_member_access.rs
  • crates/biome_css_formatter/src/scss/auxiliary/namespaced_variable.rs
  • crates/biome_css_formatter/src/scss/auxiliary/qualified_name.rs
  • crates/biome_css_formatter/src/scss/auxiliary/variable.rs
  • crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs
  • crates/biome_css_formatter/src/scss/value/identifier.rs
  • crates/biome_css_formatter/src/scss/value/mod.rs
  • crates/biome_css_formatter/src/scss/value/namespaced_identifier.rs
  • crates/biome_css_parser/src/syntax/at_rule/page.rs
  • crates/biome_css_parser/src/syntax/block/declaration_or_at_rule_list_block.rs
  • crates/biome_css_parser/src/syntax/block/declaration_or_rule_list_block.rs
  • crates/biome_css_parser/src/syntax/declaration.rs
  • crates/biome_css_parser/src/syntax/mod.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/each_at_rule.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/for_at_rule.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/module_clauses.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/parameter.rs
  • crates/biome_css_parser/src/syntax/scss/declaration/mod.rs
  • crates/biome_css_parser/src/syntax/scss/declaration/variable.rs
  • crates/biome_css_parser/src/syntax/scss/expression/list.rs
  • crates/biome_css_parser/src/syntax/scss/function_name.rs
  • crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs
  • crates/biome_css_parser/src/syntax/scss/identifiers/mod.rs
  • crates/biome_css_parser/src/syntax/scss/identifiers/module_member_access.rs
  • crates/biome_css_parser/src/syntax/scss/mod.rs
  • crates/biome_css_parser/src/syntax/scss/value/any.rs
  • crates/biome_css_parser/src/syntax/scss/value/function.rs
  • crates/biome_css_parser/src/syntax/value/function/call.rs
  • crates/biome_grit_patterns/src/grit_target_language/css_target_language/constants.rs
  • crates/biome_grit_patterns/src/grit_target_language/css_target_language/generated_mappings.rs
  • xtask/codegen/css.ungram
  • xtask/codegen/src/css_kinds_src.rs
💤 Files with no reviewable changes (5)
  • crates/biome_css_formatter/src/scss/value/namespaced_identifier.rs
  • crates/biome_css_formatter/src/scss/any/declaration_name.rs
  • crates/biome_css_formatter/src/scss/auxiliary/qualified_name.rs
  • crates/biome_css_formatter/src/scss/value/mod.rs
  • crates/biome_css_formatter/src/scss/value/identifier.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/biome_css_parser/src/syntax/value/function/call.rs (1)

150-155: Stale wording in the diagnostic after the rename.

The rest of the PR moves from "qualified name" to "module member access", but the user-facing error string on line 153 still says "SCSS qualified function names". Not broken, just a small drift worth tidying while you're here.

✏️ Suggested tweak
-                scss_only_syntax_error(p, "SCSS qualified function names", marker.range(p))
+                scss_only_syntax_error(p, "SCSS module member access function names", marker.range(p))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/value/function/call.rs` around lines 150 -
155, Update the stale user-facing diagnostic string used when SCSS exclusive
syntax is detected: in the call chain on
CssSyntaxFeatures::Scss.parse_exclusive_syntax (the closure that calls
scss_only_syntax_error), replace the message "SCSS qualified function names"
with wording consistent with the PR rename (e.g. "SCSS module member access").
Locate the use site guarded by context.is_scss_exclusive_syntax_allowed() and
is_at_scss_module_member_access(p) and change only the diagnostic text passed to
scss_only_syntax_error so other behavior remains identical.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_css_parser/src/syntax/value/function/call.rs`:
- Around line 117-120: The SCSS module-member detection here hardcodes
p.nth_at(n + 3, T!['(']) but needs to mirror the SCSS-specific branching used in
is_at_scss_function: update the condition inside the block that references
is_nth_at_scss_module_member_access so it checks p.nth_at(n + 2, T![$]) and, if
true, tests for '(' at n + 4, otherwise at n + 3; ensure this change is applied
where context.is_scss_exclusive_syntax_allowed() is used alongside
is_nth_at_scss_module_member_access so the generic path matches the SCSS
helper's offsets.

---

Nitpick comments:
In `@crates/biome_css_parser/src/syntax/value/function/call.rs`:
- Around line 150-155: Update the stale user-facing diagnostic string used when
SCSS exclusive syntax is detected: in the call chain on
CssSyntaxFeatures::Scss.parse_exclusive_syntax (the closure that calls
scss_only_syntax_error), replace the message "SCSS qualified function names"
with wording consistent with the PR rename (e.g. "SCSS module member access").
Locate the use site guarded by context.is_scss_exclusive_syntax_allowed() and
is_at_scss_module_member_access(p) and change only the diagnostic text passed to
scss_only_syntax_error so other behavior remains identical.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8dc8839b-5efe-431e-ae17-1d58be372f72

📥 Commits

Reviewing files that changed from the base of the PR and between e141e3b and 02082de.

📒 Files selected for processing (10)
  • crates/biome_css_formatter/src/scss/auxiliary/module_member_access.rs
  • crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs
  • crates/biome_css_parser/src/syntax/declaration.rs
  • crates/biome_css_parser/src/syntax/mod.rs
  • crates/biome_css_parser/src/syntax/scss/at_rule/parameter.rs
  • crates/biome_css_parser/src/syntax/scss/declaration/mod.rs
  • crates/biome_css_parser/src/syntax/scss/mod.rs
  • crates/biome_css_parser/src/syntax/scss/value/any.rs
  • crates/biome_css_parser/src/syntax/scss/value/function.rs
  • crates/biome_css_parser/src/syntax/value/function/call.rs
🚧 Files skipped from review as they are similar to previous changes (6)
  • crates/biome_css_parser/src/syntax/scss/at_rule/parameter.rs
  • crates/biome_css_parser/src/syntax/scss/declaration/mod.rs
  • crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs
  • crates/biome_css_parser/src/syntax/mod.rs
  • crates/biome_css_parser/src/syntax/scss/mod.rs
  • crates/biome_css_parser/src/syntax/scss/value/any.rs

Comment on lines 117 to 120
|| (context.is_scss_exclusive_syntax_allowed()
&& is_nth_at_scss_qualified_name(p, n)
&& is_nth_at_scss_module_member_access(p, n)
&& p.nth_at(n + 3, T!['(']))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all callers of is_at_scss_function / is_nth_at_scss_function to confirm
# they run ahead of the generic function detector on the SCSS-aware path.
rg -nP '\b(is_at_scss_function|is_nth_at_scss_function|is_at_function_with_context|is_nth_at_function_with_context)\b' --type=rust -C2

Repository: biomejs/biome

Length of output: 9747


🏁 Script executed:

# Read the specific function where the potential issue is
sed -n '111,125p' crates/biome_css_parser/src/syntax/value/function/call.rs

Repository: biomejs/biome

Length of output: 519


🏁 Script executed:

# Check the is_nth_at_scss_module_member_access implementation
rg -A10 'fn is_nth_at_scss_module_member_access' crates/biome_css_parser/src/syntax/scss/

Repository: biomejs/biome

Length of output: 1309


🏁 Script executed:

# Check the suggested alignment location in scss/value/function.rs
sed -n '20,40p' crates/biome_css_parser/src/syntax/scss/value/function.rs

Repository: biomejs/biome

Length of output: 690


🏁 Script executed:

# Check how is_at_scss_function is used in the parsing path
rg -B5 -A5 'is_nth_at_function_with_context' crates/biome_css_parser/src/syntax/ | head -60

Repository: biomejs/biome

Length of output: 2680


🏁 Script executed:

# Verify the parsing order in scss/value/any.rs where is_at_scss_function is used
sed -n '14,65p' crates/biome_css_parser/src/syntax/scss/value/any.rs

Repository: biomejs/biome

Length of output: 1789


Align n + 3 offset to match is_nth_at_scss_module_member_access cases.

is_nth_at_scss_module_member_access supports both module.name (4 tokens, ( at n + 3) and module.$name (5 tokens, ( at n + 4). The SCSS-specific helper in scss/value/function.rs (lines 35–37) correctly branches on p.nth_at(n + 2, T![$]), but this generic path still hardcodes n + 3.

In practice, is_at_scss_function runs first on the SCSS-aware path and absorbs this case, so it's dormant. But the two detectors drifting apart is a maintenance risk—worth mirroring the offset logic for consistency.

🔧 Suggested alignment
     is_nth_at_identifier(p, n) && p.nth_at(n + 1, T!['('])
         || (context.is_scss_exclusive_syntax_allowed()
             && is_nth_at_scss_module_member_access(p, n)
-            && p.nth_at(n + 3, T!['(']))
+            && p.nth_at(n + if p.nth_at(n + 2, T![$]) { 4 } else { 3 }, T!['(']))
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
|| (context.is_scss_exclusive_syntax_allowed()
&& is_nth_at_scss_qualified_name(p, n)
&& is_nth_at_scss_module_member_access(p, n)
&& p.nth_at(n + 3, T!['(']))
}
|| (context.is_scss_exclusive_syntax_allowed()
&& is_nth_at_scss_module_member_access(p, n)
&& p.nth_at(n + if p.nth_at(n + 2, T![$]) { 4 } else { 3 }, T!['(']))
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_parser/src/syntax/value/function/call.rs` around lines 117 -
120, The SCSS module-member detection here hardcodes p.nth_at(n + 3, T!['('])
but needs to mirror the SCSS-specific branching used in is_at_scss_function:
update the condition inside the block that references
is_nth_at_scss_module_member_access so it checks p.nth_at(n + 2, T![$]) and, if
true, tests for '(' at n + 4, otherwise at n + 3; ensure this change is applied
where context.is_scss_exclusive_syntax_allowed() is used alongside
is_nth_at_scss_module_member_access so the generic path matches the SCSS
helper's offsets.

@codspeed-hq

codspeed-hq Bot commented Apr 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 38 untouched benchmarks
⏩ 218 skipped benchmarks1


Comparing db/scss-interpolation-5 (4830749) with main (6a19cea)

Open in CodSpeed

Footnotes

  1. 218 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.

@denbezrukov denbezrukov merged commit d6c44d1 into main Apr 17, 2026
30 checks passed
@denbezrukov denbezrukov deleted the db/scss-interpolation-5 branch April 17, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter A-Linter Area: linter 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.

1 participant