Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Control whether Firefox renders web pages in dark or light mode

+4
−0

It has been reported that, if on a dark theme in KDE, Firefox automatically renders some websites that support it (e.g. Duckduckgo does, but Codidact doesn't) in dark mode.

How can I better control how Firefox behaves in respect to that?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Not a general solution, but for ddg in particular, you can activate dark mode in the settings https:/... (2 comments)

1 answer

+5
−0

According to this support answer to "Home page is black",

  1. Enter about:config in the address bar.

  2. Edit the value of "layout.css.prefers-color-scheme.content-override" to

    0 to use a dark background
    1 to use a light background
    2 to follow the system GTK theme
    3 to follow the browser toolbar theme
    

Some notes:

  • The option is not documented yet.

  • It doesn't work if "privacy.resistFingerprinting" is true.

  • Since few web pages offer a dark mode, don't expect this to affect many of them. If you want to force a dark background for any page, there are several add-ons for that, for example Dark Reader and Midnight Lizard.

  • If you choose 2 and use a global dark theme on KDE, you also need to set a dark GTK theme in the settings manager (Application style > GNOME/GTK application style). Choosing only the global theme as dark will have no effect on Firefox, because the former is Qt based and the latter GTK based.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

As alternative for darkreader, I also like `Midnight Lizard`. In my experience, midnight lizard is a ... (1 comment)

Sign up to answer this question »