-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the bug
I know svelte5 is compatible with CSS nesting, but it seems the compiler is giving me an error when using "&" as for the root element.
"Nesting selectors can only be used inside a rule or as the first selector inside a lone :global(...) (css_nesting_selector_invalid_placement)"
ref: https://css-tip.com/root-selector/


Reproduction
https://svelte.dev/playground/0301a48be01b490ea4d1bdeacd9c17a7?version=5.0.5
Logs
No response
System Info
System:
OS: macOS 15.0.1
CPU: (12) arm64 Apple M2 Max
Memory: 21.97 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node
npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm
pnpm: 9.12.1 - ~/Library/pnpm/pnpm
bun: 1.1.30 - ~/.bun/bin/bun
Browsers:
Edge: 130.0.2849.52
Safari: 18.0.1Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels