Closed bdpartridge closed 1 week ago
I was able to work around this by replacing transition:scale
with separate in:scale
and out:scale
directives.
FWIW this works a lot better in Svelte 5, which uses the Web Animations API (demo). There are still some glitches around rapid interactions between animations and transitions, but those are unrelated to this issue
Thanks @Rich-Harris. That's good to hear. I'm very much looking forward to Svelte 5's first general release!
Closing because this is fixed in Svelte 5
Describe the bug
When the
flip
animation is used in conjunction with thescale
transition, the element's original position isn't preserved while transitioning out. It looks like the correct translation is applied with an inlinetransform
style, but it's being overridden by atransform
style that's applied by the CSS animation that's created for the transition; thetransform
in the animation rule only includesscale
and nottranslate
, so the translation is wiped out.Reproduction
Minimally reproduced here: https://svelte.dev/repl/b278f2bca76e472db771d7c5e0e58503?version=4.2.12.
To reproduce:
Logs
No response
System Info
Severity
annoyance