Disable Firefox's night mode when the system is using a dark theme

I often use dark themes when I use Arch Linux, but I don't want some pages switch to night mode automatically when I browse them.

I often use dark themes when I use Arch Linux, but I don’t want some pages switch to night mode automatically when I browse them.

I added the value ui.systemUsesDarkTheme to 0 in about:config as it is mentioned in zhullyb’s blog1.

But I found out that with the recent update of firefox to 95.0, this doesn’t seem to work anymore2. So I found another way in the forum: change the value of layout.css.prefers-color-scheme.content-override3.

Where 0 indicates dark mode, 1 indicates light mode, 2 indicates the system theme color and the default value of 3 indicates the Firefox theme color.

Therefore, we need to change this value to 1 to force the page to use day mode.


  1. 在系统使用暗色主题时禁用 Firefox 的夜间模式 — 竹林里有冰的博客 (Chinese only) ↩︎

  2. #archlinux-cn message history  ↩︎

  3. Help: Is there a way to disable dark mode websites? — reddit  ↩︎

Licensed under CC BY-NC-SA 4.0
Last updated on Mar 12, 2022 19:28 +0800
Built with Hugo
Theme Stack designed by Jimmy