-
- Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
Description
Describe the bug
There's a bug in how some css selectors are compiled, such that the class that the compiler adds (to scope things to the module) is prepended to the contents of :global(...)
.
Reproduction
:global(div) > div { color: red; }
compiles to:
.svelte-lxuwwediv>div.svelte-lxuwwe{color:red}
This bug is about the extra .svelte-lxuwwe
at the beginning that's smashed right up against the first div
.
Here's a repl showing this in action: https://svelte.dev/repl/9b67838a3ad04a52b3a21255f84051c2?version=3.38.3
Logs
No response
System Info
System: OS: Linux 5.10 Alpine Linux CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz Memory: 235.31 MB / 7.43 GB Container: Yes Shell: 1.32.1 - /bin/ash Binaries: Node: 16.2.0 - /usr/local/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 7.13.0 - /usr/local/bin/npm npmPackages: rollup: ^2.3.4 => 2.49.0 svelte: ^3.0.0 => 3.38.2
Severity
annoyance