Skip to content

Can anybody tell me why this CSS is invalid in Svelte 5 (next 166) but perfect in Svelte 4? #12214

Answered by 7nik
webJose asked this question in Q&A
Discussion options

You must be logged in to vote

Technically, it's closer to the selector combinators (space), >, +, and ~. It just compiles to that.
Also, it would be weird to compile

div.cb-grid {
  ...
  :global(&) > :global(*) {}
}

to

div.cb-grid.svelte-hash {} /* scoped parent */
div.cb-grid > * {} /* non-scoped parent */

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@webJose
Comment options

@7nik
Comment options

7nik Jun 28, 2024
Collaborator

@webJose
Comment options

@7nik
Comment options

7nik Jun 28, 2024
Collaborator

Answer selected by webJose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants