-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
@nuxtjs/color-mode: ^4.0.0
nuxt: ^3.20.2
Reproduction Link
I will attach a screen recording showing the issue.
The bug can also be reproduced directly on https://nuxt.com (its built-in color-mode demo).
Steps to reproduce
- Use Nuxt 3 SSR with
@nuxtjs/color-modeandstorage: 'localStorage'. - Switch theme from light → dark.
- Open any page link in a new tab (
target="_blank"). - Repeat quickly by opening multiple links in new tabs in rapid succession.
What is Expected?
- The new tab should load immediately with the correct theme (dark).
- The value in
localStorageshould stay stable. - No flash or fallback to light mode should occur.
What is actually happening?
- When opening a new tab, the theme briefly resets to light, then switches back to dark after hydration.
localStoragetemporarily changes from"dark"→"light"→"dark"again.- When opening tabs quickly, the UI becomes visually inconsistent due to the flicker.
This issue also happens on https://nuxt.com, which indicates it is a general problem with @nuxtjs/color-mode using localStorage in SSR mode.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working