-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
bugcompilerChanges relating to the compilerChanges relating to the compilercssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling
Description
Describe the bug
Svelte 5 can not play CSS animation, because wrong css is generated.
generated:
svelte-1f68qn8-animation: 1s linear infinite animation;
but should be:
animation: 1s linear infinite svelte-1f68qn8-animation;
Reproduction
<span />
<style>
@keyframes animation {
0% {
transform: scale(1);
}
100% {
transform: scale(2);
}
}
* {
animation: 1s linear infinite animation;
display: block;
width:40px;
height:40px;
background:red;
border-radius:999px;
}
</style>
CSS output:
@keyframes svelte-1f68qn8-animation {
0% {
transform: scale(1);
}
100% {
transform: scale(2);
}
}
.svelte-1f68qn8 {
svelte-1f68qn8-animation: 1s linear infinite animation;
display: block;
width:40px;
height:40px;
background:red;
border-radius:999px;
}
Logs
No response
System Info
Svelte v5.0.0-next.22Severity
annoyance
Metadata
Metadata
Assignees
Labels
bugcompilerChanges relating to the compilerChanges relating to the compilercssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling