Prevent layout shift when the theme switcher is rendered #5085
Labels
🕹 aspect: interface
Concerns end-users' experience with the software
✨ goal: improvement
Improvement to an existing user-facing feature
🟧 priority: high
Stalls work on the project or its dependents
🧱 stack: frontend
Related to the Nuxt frontend
Problem
Currently, when the theme switcher is rendered, it shifts the footer layout. This was done to avoid client-server mismatch and subsequent re-rendering.
Description
A better solution would be to render a "unknown" value on the server, and then, in
onMounted
, set the correct value in the theme switcher. This way, there will be no layout shifting and no client-server mismatch.Alternatives
Additional context
The text was updated successfully, but these errors were encountered: