Is there still no way to prevent the flash bang while waiting for initial content from the server?
A small blocking ` ` in the ` ` that reads the saved preference from localStorage and sets a class on ` ` before any rendering happens is the standard approach. You can also set ` ` which tells the browser to use the OS preference for the initial paint, covering the default case without any JS at all.
Six Levels of Dark Mode (2024)
51–56 of 56 posts
Re: Six Levels of Dark Mode (2024)
#52Earlier quoted context omitted.
I do wish there was more conversation around the levels of blackness for dark modes. Black screen and white text is physically painful for me. I usually have to resort to reader mode, or open up dev tools and change colors myself, to make a page like this readable for me. I appreciate how hard it can be to make a good dark mode; I've spent months building a custom dark theme I term "mid-contrast". It's still WCAG com…
Pure black background with pure white elements is a common accessibility issue. And just curious, why would using "only" 16 colors be silly?
I've been spending some time creating a Visual Studio theme using this palette and the way that IDE uses colors is... less than great. Trying to find the right token to change is an exercise in madness, and many things that are visually the same in importance/hierarchy use very slightly different shades for some unknown reason.
Re: Six Levels of Dark Mode (2024)
#53Earlier quoted context omitted.
>I've heard people say that pure black is more battery efficient for OLED displays (but don't know if this is true) No. https://www.xda-developers.com/amoled-black-vs-gray-dark-mod...
Did you even read before pasting? Yes technically it is, which would indeed be in line with "levels of dark mode".
Re: Six Levels of Dark Mode (2024)
#54kind of sad that the CSS specification wound up with this clunky `light-dark(white,black)` thing instead of literally anything more extensible like, `themed(dark(black), light(white), retro(purple))`. Then you'd be able to have a cool theme dropdown like sites used to have, fully CSS-driven with essentially no JS required, in a compatible and modern way.
It can be an interesting discussion to follow: https://github.com/w3c/csswg-drafts/issues/9660
Re: Six Levels of Dark Mode (2024)
#55kind of sad that the CSS specification wound up with this clunky `light-dark(white,black)` thing instead of literally anything more extensible like, `themed(dark(black), light(white), retro(purple))`. Then you'd be able to have a cool theme dropdown like sites used to have, fully CSS-driven with essentially no JS required, in a compatible and modern way.
Re: Six Levels of Dark Mode (2024)
#56Is there still no way to prevent the flash bang while waiting for initial content from the server?