sandoche / Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
https://darkmodejs.learn.uno
MIT License
2.71k stars 175 forks source link

Flicker when loading pages #72

Open hirani89 opened 3 years ago

hirani89 commented 3 years ago

Hi,

I am using this plugin in a next.js application and I am having issues.

When dark mode is selected, pages seem to load in light first then toggle to dark mode.

I added autoMatchOsTheme: false. But that didn't work. Same thing in chrome and firefox.

Here is the staging site.

Purfview commented 2 years ago

You need to load it before DOM is loaded, you can get some ideas from: https://github.com/Purfview/Darkmode-User

v1.7 is when feature of the seamless transitions to dark mode was added.

Pro-tonn commented 2 years ago

Hi,

I am using this plugin in a next.js application and I am having issues.

When dark mode is selected, pages seem to load in light first then toggle to dark mode.

I added autoMatchOsTheme: false. But that didn't work. Same thing in chrome and firefox.

Here is the staging site.

Hi, what was your solution to the dark and light mode?

hirani89 commented 2 years ago

I am still looking for a solution that works on my setup. I've been busy with other stuff so haven't been able to fix this at the moment.

Pro-tonn commented 2 years ago

Thanks! Based on your site, I see you were able to modify the "dark" and "light" colors. How did you do it and also how did you get the "custom" label to work.