You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When transitioning from one page to another I can see white background for an instant.
It's a bit hard on the eyes to see this abrupt white flash.
It looks like the flash is more apparent in Firefox. In Chrome is not noticeable most of the times but happens as well sometimes.
I'm not sure if this is an easy thing to fix or it's a browser issue.
The text was updated successfully, but these errors were encountered:
It's because the dark mode is implemented in javascript instead of css, which means the browser renders the page with a white background (and everything that goes with it) first, and then runs the javascript which redraws everything with a black background.
The solution is to rewrite this in CSS, using @media (prefers-color-scheme:dark) to respect the user's choice, instead of javascript buttons.
If we want users to be able to use a different color scheme on this website than the rest of their browser, then we can implement a javascript override, but that's a detail IMO and not necessary for a first version.
I have implemented all of this (including the JS overrride) myself so feel free to ping me if you (or anyone else) wants to give this a shot :)
(actually, if you look at the website on my profile you'll have an example of this implemented, and it's a really tiny website so it shouldn't be too hard to read its CSS & JS code)
When transitioning from one page to another I can see white background for an instant.
It's a bit hard on the eyes to see this abrupt white flash.
It looks like the flash is more apparent in Firefox. In Chrome is not noticeable most of the times but happens as well sometimes.
I'm not sure if this is an easy thing to fix or it's a browser issue.
The text was updated successfully, but these errors were encountered: