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:
-
0to tell websites to always use the light theme. -
1to tell websites to always use the dark theme. -
2to tell websites you have no preference.
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.
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.
2 thoughts on “Howto: Stop Firefox Forcing Dark Mode on Websites”
about:config, Firefox’s hidden gem.
| Reply to original comment on twitter.com
@Edent i get migraines. And I hate dark mode.The irony here is that its not about light, its about contrast with the surrounding environment. Light mode is less hurtful to migraines during the day.
| Reply to original comment on mstdn.social