-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
I just noticed a Svelte 5 bug concerning the CSS animation property where only the first animation in a comma-separated list is applied to an element. Subsequent animations after the first comma are ignored. The supplied code does work as expected in Svelte 4.
Reproduction
<div></div>
<style>
@keyframes color-change {
from {
background-color: blue;
}
to {
background-color: green;
}
}
@keyframes size-change {
from {
transform: scale(1);
}
to {
transform: scale(1.5);
}
}
div {
width: 100px;
height: 100px;
background-color: blue;
/* Color-change animation works, but size-change does not */
animation:
color-change 3s infinite alternate,
size-change 2s infinite alternate;
/* Both work */
/* animation: color-change 3s infinite alternate;
animation: size-change 2s infinite alternate; */
}
</style>
Logs
No response
System Info
System:
OS: macOS 14.2.1
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 84.42 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.5.0 - /usr/local/bin/node
npm: 10.2.4 - /usr/local/bin/npm
pnpm: 8.14.1 - /usr/local/bin/pnpm
bun: 1.0.22 - /usr/local/bin/bun
Browsers:
Brave Browser: 120.1.61.114
Chrome: 120.0.6099.216
Edge: 120.0.2210.133
Safari: 17.2.1
npmPackages:
svelte: next => 5.0.0-next.35
Severity
annoyance
brunnerh and craig-jennings
Metadata
Metadata
Assignees
Labels
No labels