Page MenuHomePhabricator

Test implementation with web browsers' dark mode
Closed, ResolvedPublic

Description

  • enable-force-dark under Chromium's chrome://flags
  • browser.in-content.dark-mode in Firefox' about:config
  • etc

Event Timeline

Aklapper changed the task status from Open to Stalled.Jul 22 2021, 3:38 PM
Aklapper triaged this task as Low priority.
Aklapper created this task.

Is the intent of this task that the css used for the site automatically follows any browser specified preference for light/dark mode? Or instead is the intent just to ensure that the site is known to be functional with the browser preference set to either mode?

apaskulin changed the task status from Stalled to Open.Apr 18 2022, 8:32 PM
apaskulin subscribed.

Dark mode is available in the demo site, so this can now be tested.

@Aklapper, I'm not sure how to answer Bryan's question. Can you help?

Or instead is the intent just to ensure that the site is known to be functional with the browser preference set to either mode?

This one. I'd just to make sure that things are readable and accessible from a user perspective (and I naively do not expect problems).

Aklapper claimed this task.

Tested and works as expected.

A manual, separate not-entirely-dark-mode switch is available in the top bar:

Screenshot from 2022-04-20 11-36-50.png (54×163 px, 1 KB)

Going to chrome://flags and setting enable-force-dark in Chromium 100 works as expected:
You can switch from your browser's now-default really-dark-mode to the site's not-entirely-dark-mode:

Screenshot from 2022-04-20 11-40-49.png (386×1 px, 52 KB)
Screenshot from 2022-04-20 11-40-46.png (386×1 px, 54 KB)

Going to about:config and setting layout.css.prefers-color-scheme.content-override to 0 in Firefox 99 doesn't change a thing and same for any other non-Wikimedia websites, so I'll just ignore Firefox' general problems here.