Howto: Stop Firefox Forcing Dark Mode on Websites


Here's how to stop Firefox automatically turning on dark-mode for websites.

In the address bar, type in about:config and press and accept the warning it gives you.

Add a new value ui.systemUsesDarkTheme set it to type number and pick one of the following:

  • 0 to tell websites to always use the light theme.
  • 1 to tell websites to always use the dark theme.
  • 2 to tell websites you have no preference.
Firefox config screen.

Dev Tools

If you want to do this on a one-off basis, open up the Dev Tools and click on the colour simulation icon to change your preferences.

Firefox dev tools. A pop up informs you that the colour scheme can be toggled.

It only works on a per-page basis and disappears when you refresh.

Why

I use dark mode on my laptop and most of my Linux apps. But I find most websites' dark mode to look a bit rubbish. By setting ui.systemUsesDarkTheme to 0, I get a nice looking light theme, which I can switch to dark if I want using the website's own controls.

I wish Firefox implemented this as an easy to use toggle switch - but this method works if you're happy to fiddle around in Firefox's guts.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

2 thoughts on “Howto: Stop Firefox Forcing Dark Mode on Websites”

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">