Skip to content

Styles get delayed #15773

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

Open
hahahatey opened this issue Apr 16, 2025 · 0 comments
Open

Styles get delayed #15773

hahahatey opened this issue Apr 16, 2025 · 0 comments

Comments

@hahahatey
Copy link

hahahatey commented Apr 16, 2025

Describe the bug

Hello everyone
I came across strange behavior. I have a subtree that rendered conditionally. If some element has bind:clientWidth in the subtree then styles get delayed.
How it can be seen.
We can set transition property for opacity in conditional rendered component, set initial opacity as 0 and see when its mounted transition happens from 1 to 0.
It happens only for the first mount for next ones everything works fine.

Its worth to mention that svelte is located in shadowDom

Reproduction

https://stackblitz.com/edit/vitejs-vite-vzuce61q?file=src%2FExample.svelte

Logs

System Info

Chrome Version 135.0.7049.42 
Apple M3 Pro Sequoia 15.4
"svelte": "^5.23.1",

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant