Flash of Light Theme in SSR with Dark Mode Since v2.14.3 #17953
Labels
area/plugins
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
mode/ssr
Qv2 🔝
Quasar v2 issues
What happened?
Since Quasar v2.14.3, when using SSR with dark mode enabled (
$q.dark.set(true)
), the page briefly flashes the light theme before settling on the dark theme. The server correctly renders the page with thebody--dark
class, but on the client side, it temporarily switches tobody--light
before reverting tobody--dark
. This causes a noticeable visual flicker. Prior to v2.14.3 (e.g., v2.14.2), the dark mode remained consistent without this flash.Problem occurs since this commit: c6368ba .
What did you expect to happen?
I expected the dark mode to be applied seamlessly from server to client, with the
body--dark
class remaining intact throughout the rendering process, resulting in no flash of the light theme.Reproduction URL
https://stackblitz.com/edit/quasarframework-stackblitz-templates-yrptuszq?file=quasar.config.js,src%2FApp.vue&title=Quasar%20Framework%20-%20app-vite%20v2
How to reproduce?
Alternatively, in the Quasar repo:
git checkout v2.14.3
).ui/dev
and install dependencies (npm install
).ui/dev/src/App.vue
to enable dark mode:Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Plugins (quasar), SSR Mode
Platforms/Browsers
No response
Quasar info output
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: