-
Notifications
You must be signed in to change notification settings - Fork 151
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
Not globalizing nth-child correctly #224
Comments
Fixed it temporarily with code.replace(/:nth-child\(n\)\+:global\(/g, ':nth-child(n+'); |
That's happening because we try to split the selectors into separate parts via the following regex: |
@kaisermann What do you mean by "lightweight"? I would suggest using a simple tokenizer, maybe the one used by postcss internally could be used for this. |
I mean a way to split selectors without having to install any extra library 😁. Using what PostCSS uses may resolve it, but I have to take a deeper look at its API. |
+1 on this, it's a bit odd 🙈 |
Describe the bug
This global style:
Gets processed into to this:
Which makes the rule unusable.
Expected behavior
I'd recommend you to add all these to the tests:
:nth-child() - CSS: Cascading Style Sheets | MDN
Information about your project:
svelte-preprocess
version: 4.0.12implementation
option tosass
, version 1.26.10Additional context
Actually what I'm trying to do is importing UIKit 3 inside a component:
The text was updated successfully, but these errors were encountered: