Comment by kps

24 days ago

And `:prefers-color-scheme` has been supported by all major browsers for seven years.

Windows 3 through windows 7 had pervasive support for dark mode as long as application developers didn't custom paint their user interfaces. Application developers started out almost all supporting system colors and gradually over the next 25 years or so started implementing their own custom-drawn interfaces, accelerated by embedded IE/mshtml views and then later even more by Electron. This concluded with practically zero interfaces supporting the system color scheme.

  • Yeah but "dark mode" for Win3 through WinXP was primarily to support passive matrix LCDs, which required inverted color schemes to appear with enough contrast to read. That is why the built-in "high contrast" color schemes look so aggressively awful.

    • In lieu of actual system wide dark mode for everything in Windows 10, even those awful "inverted" color schemes were useful and quite bearable after adjusting colors a bit (like this one for example https://github.com/nitschis/GreyEveTheme ), so it was at least better than nothing. It's no longer a problem in 11 though.

  • Yeah, when dark mode became "a thing" my first reaction was "...didn't we have this already?"

    I was a theme junkie back in Windows 98 times, but stopped bothering since it became increasingly clear that Microsoft was not really interested in supporting them after XP.

  • Custom painting isn't the only thing that broke it. You can customize the style (colors) of the native widgets to get a desired look but IIRC you could choose from system colors (follows the theme/mode automatically) or exact colors. Some applications used a mix of them which made the UI look awful if you switched away from whatever the default theme was.

  • Maybe the apps with the windows classic interface. I remember it starting mainly around the XP days when alls started designing these super ugly (but trendy at the time) rounded corner and bubbly interfaces that were static in resolution and colour scheme.

And broken in Chrome since the beginning:

https://issues.chromium.org/issues/366412383

  • I wouldn't call this part of the situation a bug. I'm sure everyone has their own opinion about which is the "right" way to handle a mismatch of OS level preference and browser level theme though.

    The underlying problem is Chrome exposes no (normal) setting to override the OS level setting at all, not necessarily that the preference shall always follow the browser's theme specifically.

    • I contend that this is a bug, as the browser is the User Agent. To me, this means that if the user tells the browser "use the dark theme", it's the browser's job to communicate that to the page

  • This issue is related to appearance setting inside Chrome itself (which sets Chrome's appearance, not how it should work with websites AFAIK). The core feature of prefers-color-scheme (following the OS-level setting) is working as intended.

    • It is not true that prefers-color-scheme should always follow the OS-level setting. The doc says "The method by which the user expresses their preference can vary. It might be a system-wide setting exposed by the Operating System, or a setting controlled by the user agent."[1]

      So if the user sets dark mode in the browser, do they not explicitly express their preference for websites? How could they be more explicit about the setting?

      [1]https://drafts.csswg.org/mediaqueries-5/#prefers-color-schem...

      3 replies →

  • So I guess it hasn’t been supported anywhere in a sense.

    Safari and Firefox are pretty small.