Closed Bug 1659577 Opened 5 years ago Closed 5 years ago

Add a dark mode for plaintext

Categories

(Firefox :: Theme, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1551040

People

(Reporter: aminomancer, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Currently, browser extensions like dark reader don't work on plaintext (or canvases, as in pdfjs) and there isn't an easy way for users to make stylesheets with any specificity for plaintext. The only way a user could implement it as far as I can tell is with javascript specifically listening for plaintext.css?

Actual results:

Anyway, currently you can sort of make a plaintext dark mode by changing browser.display.background_color and foreground_color, but this tends to break a lot of extension panels, etc. as they might have elements with a specified white background-color, and text overlaid with unspecified color since the authors wrote the extension with the black default text color in mind. Leading to white text on white background. So that's not really an option.

Expected results:

The ideal solution would be to just make plaintext.css a little more robust, e.g. media rules for prefers-color-scheme? Also, I expect this is substantially more difficult, but some kind of dark mode for pdfjs would be cool too. Currently you can only invert the entire canvas, which means inverted images. It would be better if there was a pref that would just shift background color to dark gray and color to white, or if the browser theme properties applied to pdfjs some other way. I personally use firefox as my main PDF viewer because it loads a lot faster than acrobat and I can ctrl+tab between it and my other browser windows. But I recognize I'm probably in the minority here, so that's a relatively minor issue. The plaintext thing really bugs me though, and I assume anyone else who is frequently looking at plaintext files on github

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Hi,

I will move this enhancement over to a component so developers can take a look over it. If this is not the correct component please feel free to change it to an appropriate one.

Thanks for your report.

Status: UNCONFIRMED → NEW
Component: Untriaged → Theme
Ever confirmed: true
Version: Firefox 81 → Trunk
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.