Hi,
it could be related to caching.
Can you turn off the cache plugin for a moment and then make a test.
Please let me know the behavior of the site after testing.
@markoarula I disabled WP Rocket and the problem persisted. I disabled it now too so you can test it.
Although the transition from light to dark mode is much faster now, the issue is still visible.
I’m not sure what could be the cause of this bug. I see the class appears at the body tag immediately, and that is the most important part.
I will try to make some tests in my WordPress installation.
I enabled WP Rocket. If you need it disabled sometime ask me for it.
@markoarula Chrome will have a Dark Mode in the next version (76). Currently, it is available in Chrome Beta.
Do you think if it can be easily in your plugin? Should be great to have a spinner with manual mode and auto mode to get automatically the Chrome mode.