Skip to content

Conversation

@Arecsu
Copy link

@Arecsu Arecsu commented Jan 27, 2026

The @scope rule parser only accepted a single selector inside the parentheses, causing a false ) expected error when using comma-separated selector lists like @scope (.foo, .bar) { }.

Extract a _parseScopeSelectorList() helper that handles comma-separated selectors, matching the existing pattern used in _parsePseudo() for pseudo-class selector lists.

Fixes microsoft/vscode#290942

@Arecsu
Copy link
Author

Arecsu commented Jan 27, 2026

@microsoft-github-policy-service agree company="MARTYR X LTD"

@Arecsu Arecsu force-pushed the fix/scope-selector-list branch from 81173ac to c5c2b42 Compare January 27, 2026 19:35
@Arecsu Arecsu changed the title Fix @scope parsing to support selector lists Fix @scope parsing to support selector lists Jan 27, 2026
The `@scope` rule parser only accepted a single selector inside the
parentheses, causing a false `) expected` error when using
comma-separated selector lists like `@scope (.foo, .bar) { }`.

This is valid CSS per the CSS Cascading and Inheritance Level 6
specification, which defines scope-start and scope-end as
<selector-list>.

Extract a _parseScopeSelectorList() helper that handles
comma-separated selectors, matching the existing pattern used
in _parsePseudo() for pseudo-class selector lists.

Fixes microsoft/vscode#290942
@Arecsu Arecsu force-pushed the fix/scope-selector-list branch from c5c2b42 to 6ebfeaa Compare January 28, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scss] @scope rule wrongly expects a parenthesis for multiple selectors

2 participants