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
To observe issue run pnpm i && pnpm dev, browse to localhost:3000 and refresh page in Firefox, Chrome or Safari.
To verify fouc started with version 334 run pnpm i -D @sveltejs/kit@1.0.0-next.333 && pnpm dev and refresh page.
Note: The reproduction test case is a little contrived but gets the job done. I encountered this bug while doing page transclusion which requires a parent with scoped styles to be called from a child that recurses on itself using svelte:self.
Edit: I'm seeing this in other projects as well which don't use recursive components. With dark themes it can cause the page to flash white with unstyled content before rendering the page properly.
The text was updated successfully, but these errors were encountered:
vhscom
changed the title
Flash of unstyled content when child calls parent with scoped styles
Flash of unstyled content in development mode
May 19, 2022
Describe the bug
Starting with Kit version 334 a momentary flash of unstyled content was introduced into the render pipeline in dev.
Reproduction
Minimal reproduction:
https://github.com/vhscom/sveltekit-bug-fouc_v1.0.0-next.334
pnpm i && pnpm dev
, browse tolocalhost:3000
and refresh page in Firefox, Chrome or Safari.pnpm i -D @sveltejs/kit@1.0.0-next.333 && pnpm dev
and refresh page.Note: The reproduction test case is a little contrived but gets the job done. I encountered this bug while doing page transclusion which requires a parent with scoped styles to be called from a child that recurses on itself using
svelte:self
.Edit: I'm seeing this in other projects as well which don't use recursive components. With dark themes it can cause the page to flash white with unstyled content before rendering the page properly.
Logs
System Info
Severity
serious, but I can work around it
Additional Information
The FOUC seems to have been introduced with #4920
The text was updated successfully, but these errors were encountered: