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.

Licensed under CC BY-NC-SA 4.0
Last updated on Mar 12, 2022 19:28 +0800

Note

Comments are not available in this language. Please switch to 简体中文 to view or leave comments.