nuxt-modules / color-mode

Dark and Light mode with auto detection made easy with Nuxt 🌗
https://color-mode.nuxtjs.org
MIT License
1.12k stars 112 forks source link

Forced color mode incorrect timing #222

Closed becem-gharbi closed 8 months ago

becem-gharbi commented 1 year ago

Version

@nuxtjs/color-mode: v3.3.2 nuxt: v3.8.2

Reproduction Link

https://stackblitz.com/edit/github-mcvmdz?file=nuxt.config.ts

Steps to reproduce

Run the application. Two pages are present:

What is Expected?

When navigating from index page to dark page the dark mode should be applied on the dark page only.

What is actually happening?

When navigating from index page to dark page the dark mode is applied instantly on the index page before the dark page is rendered.