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
Component styles flicker/blink with SSR mode on #8615
Comments
|
The same issue happens even when setting <div style="display:flex;">
{#each item as item}
<!-- represent the item details in a tailwind card -->
<div class="w-64 inline-block bg-pink">
<div>
<a href="/media/{item}">Page</a>
</div>
</div>
{/each}
</div>But I would suggest this approach be avoided. When setting e.g. 5 divs (without the for loop), there are no spaces. Only through the above do they have spaces on the server-rendered HTML, and then revert to no spaces / gaps as expected (see repro). So this seems to be more of a workaround than expected behavior. |
|
I've looked through the issues and I don't see an exact duplicate. If it wasn't clear from the OP, if you don't need SSR, disabling it avoids the issue: // +layout.ts
export const ssr = false; |


Describe the bug
When applying stylings to components or pages, on SSR mode, first server stylings get rendered, and then client ones.
In some cases, when components / pages use more 'dynamic' data like slots, $$restProps with class names, lists, etc., what oddly happens is that there is a 'flicker', where server stylings do not seem to match client ones.
Below is a video with two examples of when this happens:
flicker.mov
Reproduction
About twenty lines: https://www.sveltelab.dev/vg1t4x2cb8n84f4
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: