Skip to content

Svelte 5: invalid CSS identifier caused by a line break #9795

@mquandalle

Description

@mquandalle

Describe the bug

The following code throws an exception:

<style>
	:global(
		body
	) {
		background: yellow;
		height: 100vh;
	}
</style>

Expected a valid CSS identifier

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAEy2NwQqDMBBEf0X21EKh9ppKod_ReFCzJqFrImZjCZJ_r6m9zXsDMxuMljCAeG3guglBwHOe4QKc5gJhRWLcOfi4DMU0gRPhQzrJQpPvOzqVLLn3KpV0rra_6Ia3Xnx0SlQJifznfhQGrTYsqltdr-bnsnTN9Rjevyav7GhRgeAlYm7zF5v574qmAAAA

Logs

No response

System Info

Svelte 5

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions