Skip to content

Component styles flicker/blink with SSR mode on #8615

@Destaq

Description

@Destaq

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

I've spoken to a number of people so I don't think that it is a device-specific thing. But anyway:


  System:
    OS: macOS 13.3.1
    CPU: (8) arm64 Apple M1
    Memory: 83.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.6.0 - /opt/homebrew/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 9.4.0 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 113.1.51.114
    Safari: 16.4
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0-next.91 => 1.0.0-next.91 
    @sveltejs/kit: next => 1.0.0-next.589 
    svelte: ^3.55.1 => 3.55.1 
    vite: ^4.0.0 => 4.1.1 

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions