-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Unexpected CSS transitions on mount #15957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Another example. There are no animations, only Screen.Recording.2025-05-19.at.22.01.13.mov |
If I were to guess you have I have at least seen this exact thing before and there is also the issue #15773 that seems related to this. |
Thank you for the answer @munHunger UPD. Looks like in my case |
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: