Open Bug 1551040 Opened 4 months ago Updated 6 days ago

Make prefers-color-scheme affect plain text documents

Categories

(Core :: Layout, enhancement, P3)

67 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: sbrl, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

  1. Enabled the new prefers-color-scheme via ui.systemUsesDarkTheme
  2. Tested that it worked as expected with a normal HTML + CSS document (it did).
  3. Loaded a plain-text HTTP response. Example document: https://www.rfc-editor.org/rfc/rfc2549.txt

Actual results:

It displayed in light mode example.

Expected results:

It should have displayed in dark mode, since I have prefers-color-scheme set to dark.

I know that CSS doesn't affect plain-text documents, but it makes sense to me that if the user has indicated their preference for a dark theme via prefers-color-scheme, it would stand to reason that they'd want plain-text documents to follow this trend.

Type: defect → enhancement
Component: Theme → Layout
Product: Firefox → Core
See Also: → 1408122

https://searchfox.org/mozilla-central/source/layout/style/res/plaintext.css is the stylesheet to modify for this, but this is web-observable so it may be a source of compat bugs.

See Also: → 1520971
Summary: Make prefers-color-scheme affect HTTP plain text responses → Make prefers-color-scheme affect plain text documents
See Also: 1520971
Duplicate of this bug: 1520971
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.