4

Use Firefox with a dark theme without triggering dark themes on websites

 2 years ago
source link: https://hiddedevries.nl/en/blog/2022-01-12-use-firefox-with-a-dark-theme-without-triggering-dark-themes-on-websites
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Use Firefox with a dark theme without triggering dark themes on websites What I do About me Blog Talks Contact

Use Firefox with a dark theme without triggering dark themes on websites

Published yesterday ・ category: notes

With prefers-color-scheme, web developers can provide styles specifically for dark or light mode. Recently, Firefox started to display dark mode specific styles to users who used a dark Firefox theme, even if they have their system set to light mode.

There is a flag in Firefox that determines whether dark/light preferences are taken from the browser or from the browser theme.

This is how you set it:

  1. Go to about:config
  2. Search layout.css.prefers-color-scheme.content-override
  3. Set it to 0 to force dark mode, 1 to force light mode, 2 to set according to system’s colour setting or 3 to set according to browser theme colour

(via support.mozilla.org)

Personally, I feel respecting the system setting worked better. I hope it gets changed back. In the mean time, I hope this override helps.

Hidde de Vries (@hdv) is a freelance front-end and accessibility specialist in Rotterdam (NL), conference speaker and workshop teacher. Previously he was at the W3C (WAI), Mozilla, the Dutch government and various other organisations and businesses.

Follow @hdv on Twitter

Comments, likes & shares (31)

Marcus Herrmann replied: prefers-reasonable-firefox-behaviour-regarding-dark-mode 👇

Marcus Herrmann replied: prefers-reasonable-firefox-behaviour-regarding-dark-mode 👇

dickelippe @ home replied: Thank you for sharing! I was kind of annoyed about that behavior for quite some time as I use both the FF Standard Edition (light theme as default) and the FF Dev Edition (dark theme) to develop and test websites...

Leave a comment

Name
Email

Website

Occupation

Comment

Posted a response to this?

This website uses Webmentions. You can manually notify me if you have posted a response, by entering the URL below.

Article URL

© 2007–2022 Hidde de Vries. This site does not track.

Nederlands

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK