-
Notifications
You must be signed in to change notification settings - Fork 13
Items within a :where statement are incorrectly prefixed #515
Copy link
Copy link
Closed
Description
If you take a selector like .class-a :where(.class-b, .class-c) and try prefixing it with .prefix-class, it results in a selector .prefix-class .class-a :where(.class-b, .prefix-class .class-c), which is incorrect. I think the expected result should be .prefix-class .class-a :where(.class-b, .class-c)
It appears to be because the code splits a selector string using the string .split( ',' ) method:
postcss-prefixwrap/src/internal/domain/CSSRuleWrapper.ts
Lines 20 to 21 in c2636cd
| const rules = cssRule.selector | |
| .split(",") |
I think the AST does provide an already split cssRule.selectors property, so splitting the string might not be needed, it may be ok to lean on what the AST provides.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels