Comment by jansan

24 days ago

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...

    • I didn't meant that "only OS-level setting should be respected", what I meant is that Chrome's setting is how Chrome themes should look like, not for websites.

      Chrome already has a setting to change a specific website's color-scheme, although it's only working when Developer Tools is visible (then with Cmd+Shift+P "Toggle CSS media feature prefers-color-scheme"), so CSS implementation actually follows respecting UA-level preference over OS-level setting.

      But again, Chrome doesn't have a feature that lets users to choose which color-scheme they want to browse the web (so there is no bug, but it's a UX issue because their Appearance settings doesn't make it clear to the users what this setting changes) other than the setting they gave to developers. Honestly I would love to see all browsers have an option for how color-scheme settings should apply to websites.

      2 replies →

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

Safari and Firefox are pretty small.