logoalt Hacker News

zamadatixtoday at 3:03 PM1 replyview on HN

prefers-color-scheme has shipped for something like 7 years now and not even all of the major sites I frequent which already have a dark theme toggle support it yet. Obviously accessibility is more important than a dark theme (though it can be part of an accessibility story), but if it takes a minute to ship prefers-color-scheme on those existing themed sites and it's been so many years you get the idea of how little it's about when something is easy or not.


Replies

account42today at 3:32 PM

The problem with prefers-color-scheme is that it doesn't indicate an actual user preference since the default is not "no preference" (which used to exist as a possible value in at least FF before it was intentionally removed) but rather whatever the OS/browser picked. So any website that wants to choose a "default" appearance but still provide choice to users who actually care cannot use this mechanism at all.