You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm experiencing a strange behavior in some components in Svelte. Some elements mount while firing CSS transitions.
Here's how it works — I have a component with a transition property like this:
On mount, it animates from the default color (set in body) to the one specified in the class. Here's how it looks when I refresh the page:
Screen.Recording.2025-05-19.at.21.27.06.mov
This doesn't happen for all components. To prevent this behavior, I wrote a custom hook that adds and removes a class with transition: none for glitching elements. But this is just a temporary workaround.
It seems like I might be missing something, but I can't figure out what. Appreciate any help :-) Thank you in advance.
Reproduction
I don't have a REPL, so I can't reproduce it there. Everything works fine in the REPL. However, in this component, WorktreeTipsFooter.svelte, there's a section with a class tip-footer__tips that has this effect. It's the one shown in the video above.
If I were to guess you have customElements: true in your compiler options, and somewhere you are referencing the node that get rendered during mount (ex with a svelte action or transition).
I have at least seen this exact thing before and there is also the issue #15773 that seems related to this.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Hi! I'm experiencing a strange behavior in some components in Svelte. Some elements mount while firing CSS transitions.
Here's how it works — I have a component with a transition property like this:
On mount, it animates from the default color (set in
body
) to the one specified in the class. Here's how it looks when I refresh the page:Screen.Recording.2025-05-19.at.21.27.06.mov
This doesn't happen for all components. To prevent this behavior, I wrote a custom hook that adds and removes a class with
transition: none
for glitching elements. But this is just a temporary workaround.It seems like I might be missing something, but I can't figure out what. Appreciate any help :-) Thank you in advance.
Reproduction
I don't have a REPL, so I can't reproduce it there. Everything works fine in the REPL. However, in this component, WorktreeTipsFooter.svelte, there's a section with a class
tip-footer__tips
that has this effect. It's the one shown in the video above.Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: