-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix: global with pseudo element should be considered as global #6317
fix: global with pseudo element should be considered as global #6317
Conversation
We've had to pin to 3.37 for now, due to the issue this PR attempts to solve, as #6223 broke syntax that was previously valid using preprocessors' nesting. Before 3.38 this compiled fine (SASS): div
:global(p)
&:after, &:before
color: red Where I.e. unlike with nesting |
It will be interesting to merge this PR soon, because now in the |
Hi, since it had been some time, is there any feedback on this proposed fix in this PR? |
@roychoo Do you know how to speed up the merging process of this PR? Because for all developers who use svelte + scss this ":global()" bug is very annoying and prevents the update :'( |
I am not sure myself, this is my first time contributing to svelte |
Shameless plug: sveltejs/rfcs#13 (comment) |
Thanks for the adjustment and merged |
Thank you @Conduitry <3 |
Hi,
in PR, https://github.com/sveltejs/svelte/pull/6223/files#diff-145a1fa56c966be609d17f4af6eb9c2a0a97cd2f1c9c86bf64841595f254f51dR597, an additional check was introduced to make sure the number of selectors is equal to 1, however this also covers pseudo elements which in turn break some of the existing capabilities as describe in #6306
global(*):first-child
is no longer considered as a global where previously it was considered.Thus, adding a negation check that if there is a
ClassSelector
, it should be excluded fromglobal
check.cc: @tanhauhau (PR #6223 author)