Open Bug 1591679 Opened 5 years ago Updated 1 year ago

Force web content to use dark mode

Categories

(Firefox :: General, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: volpedifuoco, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: parity-chrome)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Why/User Benefit/User Problem

As a user, I want my browser to be able to force websites content to use dark mode, so I can have control over how my browser in customized to match my preferences.

What / Requirements

  • There exists a setting that forces web content to use a dark theme
  • There exists an easily accessible escape hatch to get out of the forced dark theme if the website breaks

Acceptance Criteria (how do I know when I’m done?)

  • I can choose to view website content in dark mode.
  • I don't see a flash of white/light colors before the dark theme is applied.
  • I can interact with the sites when the dark theme is force applied.

We avoid cases where we use dark foreground and background colors. For example testing forms is a common source of problems.

Same feature request on the Firefox Preview Github page: https://github.com/mozilla-mobile/fenix/issues/2139

Essentially, it is the same feature introduced recently in Chromium stable channel (chrome://flags/#enable-force-dark), on both desktop and mobile.

Component: Untriaged → General

Emilio, any idea where this should be tracked? Does it require layout specific support?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
Keywords: parity-chrome

So there's a devtools setting to allow emulating prefers-color-scheme: dark which already landed (bug 1550804).

I don't think we render form controls differently based on prefers-color-scheme, so that should be all that's needed until we make that change, if we do that at all, right? Or am I misunderstanding?

Flags: needinfo?(emilio)

Oh, I missed what the Chrome flag did (because apparently it needed a restart). So this is about auto-darkening web content, by filtering colors and inverting presumably?

That sounds a bit of a different thing, and yeah, that'll most likely need layout engine support (https://drafts.csswg.org/css-color-adjust/ is where some of these proposals are).

Depends on: css-color-adjust-1
Priority: -- → P5
Depends on: 1794320
Depends on: 1794482
Depends on: 1794484
Severity: normal → S3
Depends on: 1801520
Depends on: 1806948
You need to log in before you can comment on or make changes to this bug.