Skip to content
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

[AppLayout] Improve initial SSR layout #22

Closed
techniq opened this issue Mar 31, 2022 · 0 comments · Fixed by #498
Closed

[AppLayout] Improve initial SSR layout #22

techniq opened this issue Mar 31, 2022 · 0 comments · Fixed by #498
Milestone

Comments

@techniq
Copy link
Owner

techniq commented Mar 31, 2022

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'

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

Successfully merging a pull request may close this issue.

1 participant