-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Items within a :where
statement are incorrectly prefixed
#515
Comments
Thanks for reporting this, I will take a look at your suggestion soon and prepare an update to resolve the issue. |
dbtedman
added a commit
that referenced
this issue
Aug 5, 2024
dbtedman
added a commit
that referenced
this issue
Aug 5, 2024
Fix will be included in 1.51.0 release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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.The text was updated successfully, but these errors were encountered: