Skip to content

[AppLayout] Improve initial SSR layout #22

@techniq

Description

@techniq

Within AppLayout, since matchMedia() is used to determine if the menu drawer should be temporary (overlay) or persistent (side by side), and the navWidth is set via CSS variables, currently there is a layout shift (both on mobile (switch from persistent to temporary) and on desktop (setting nav width)).

We used to disable SSR rendering to bypass the issue by setting ssr: false in svelte.config.js, but this was replaced with a handle hook, which is still possible, but not as clean.

config.kit.ssr has been removed — use the handle hook instead: https://kit.svelte.dev/docs/hooks#handle'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions