Skip to content

fix: split @scope limit on word to only - #69

Open
Steve0x2a wants to merge 1 commit into
css-modules:masterfrom
Steve0x2a:fix/scope-to-token-split
Open

fix: split @scope limit on word to only#69
Steve0x2a wants to merge 1 commit into
css-modules:masterfrom
Steve0x2a:fix/scope-to-token-split

Conversation

@Steve0x2a

Copy link
Copy Markdown

@scope prelude handling used atRule.params.split("to"), which splits on the substring to rather than the CSS to keyword. Selectors such as .inputInnerButtons or :local(.auto) were rewritten as extra to segments.

This splits only on a top-level to ident (outside parentheses and strings). Existing @scope fixtures are unchanged.

Reported by @ChrisKuBa.

Fixes #68

Split @scope params on the `to` keyword at parenthesis depth 0
instead of String#split("to"), so selectors containing the letters
"to" are not mangled.

Signed-off-by: Yi Zhan <stevesough@gmail.com>
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.

Bugs in handling @scope rule - "to" as a part of a selector + complex local selectors

1 participant