@adamzea There is the (deprecated, don’t use this!) concept of CSS system colors: drafts.csswg.org/css-color/#sys… 🌈. For so..twitter.com/i/web/status/1…7b
@designcoursecom Thanks for the shout-out to my article web.dev/prefers-color-… at youtu.be/kVKuH5H7nuA?t=… 😊. Cool video, too! Keep rockin’!
@MrGrigri @CodePen Have you seen web.dev/prefers-color-…, specifically the `<dark-mode-toggle>` custom element?
@Rich_Clark @brucel @iandevlin @simevidas @stevefaulkner @internetarchive Confirmed working 🙌!
Also confirmed it’s..twitter.com/i/web/status/1…qD
@davidhellmann Bei Interesse ist hier noch mehr relevantes Lesematerial: web.dev/prefers-color-…. 🌒
PS: Großartige..twitter.com/i/web/status/1…ZM
@symfony_en @suzuki Sorry, yeah, I just saw that (quoted tweet). Theme switches require a site reload though…
Withtwitter.com/i/web/status/1…vNKM
@suzuki Oh, interesting, you’re right. They store the initial value:
“`
if (document.body.classList.contains(‘dark..twitter.com/i/web/status/1…8N
@hotta_kosuke @suzuki Actually it’s not based on `prefers-color-scheme`, they use a manual theme switcher (see bott..twitter.com/i/web/status/1…xH
@hrdtbs_ch Consider avoiding pure white: web.dev/prefers-color-….
@brucel @iandevlin @simevidas @stevefaulkner @Rich_Clark Should you close it for good, please put it on the..twitter.com/i/web/status/1…cb
@donatj I half-suspected you were. But people actually implement it like that, so I thought just in case I’d advice against it. 😊
@macntaco_ebooks Check out github.com/tomayac/dark-m… for a working example.
@donatj Inversion rarely is a solution: web.dev/prefers-color-…. It can work for icons, though: web.dev/prefers-color-….