halfmoonui / halfmoon

Halfmoon is a highly customizable, drop-in Bootstrap replacement. It comes with three built-in core themes, with dark mode support for all themes and components.
https://www.gethalfmoon.com
MIT License
3.01k stars 118 forks source link

Flickering dark mode switch #111

Closed neerajadhav closed 3 years ago

neerajadhav commented 3 years ago

I have made a hugo blog site using halfmoon css, everything is cool. But there is one problem in dark mode, when I refresh the page or go to some internal link then a flickering is observed while loading for a millisecond, which don't look professional. Is there any way to stop that...?

Link to my website: neerajadhav.github.io

Toby222 commented 3 years ago

What browser are you using? I'm on Chrome and there's no flickering for me.

neerajadhav commented 3 years ago

I used Firefox as well as Microsoft edge, and the same is happening on chrome in my android device😕

neerajadhav commented 3 years ago

I used Firefox as well as Microsoft edge, and the same is happening on chrome in my android device😕

Project_07-30_Full HD 1080p_1.gif

Toby222 commented 3 years ago

Hm. Okay, I can get it on my phone, or on my desktop if I reload without cache.

I suppose you'd have to apply the dark-mode class server-side when needed to avoid the flashing from the theme swapping out?