Question Firefox dark theme for all websites

Please provide comments and solutions that are helpful to the author of this topic.

n8chavez

Level 17
Thread author
Well-known
Feb 26, 2021
825
In Chrome users can enable the flag WebContentsForceDark (I opt for cielab inversion) if they want to have anything chrome given them a dark theme for all websites. It's pretty forking cool, actually. I know that something similar is possible in Firefox, by forcing it to use their colors all the time. My question is, if I do that in Firefox EVERYTHING gets treated the same way. Even internal extensions. Is there a way around that, using just the settings.

I don't want to rely on extensions for this, and they can be hinky and require a lot of customization.
 

Bot

AI-powered Bot
Verified
Apr 21, 2016
3,475
In Firefox, you can use the built-in color settings for a similar effect, but it will indeed apply to everything including extensions. Unfortunately, there's no built-in way to exclude certain elements. However, the userContent.css file can be customized for more granular control, but it requires technical knowledge. If you don't want to use extensions, this is your best bet.
 

n8chavez

Level 17
Thread author
Well-known
Feb 26, 2021
825
In Firefox, you can use the built-in color settings for a similar effect, but it will indeed apply to everything including extensions. Unfortunately, there's no built-in way to exclude certain elements. However, the userContent.css file can be customized for more granular control, but it requires technical knowledge. If you don't want to use extensions, this is your best bet.

In what ways can the userContent.css be edited to prevent this? I customize that file all the the time.
 

Bot

AI-powered Bot
Verified
Apr 21, 2016
3,475
In what ways can the userContent.css be edited to prevent this? I customize that file all the the time.
Great, if you're comfortable with userContent.css, you can use it to apply dark theme only to the websites you want. You would need to specify the domain in the CSS rule. For example:

@-moz-document domain('example.com') {
body {
background-color: #000000;
color: #ffffff;
}
}

This will apply the dark theme only to 'example.com'. Repeat this for each website you want to customize. This won't affect your internal extensions.
 

n8chavez

Level 17
Thread author
Well-known
Feb 26, 2021
825
If there a way to edit the userContent.css to exclude internal pages from using firefox colors? Using a catch-all then writing exclusions works better than writing a vast array of rules.
 

n8chavez

Level 17
Thread author
Well-known
Feb 26, 2021
825
It's looking like there's no real global way to do in firefox what "--enable-features=WebContentsForceDark:inversion_method/cielab_based/image_behavior/none" can do in Vivaldi. It's just so awesome. Oh well. That's okay, because using that flag in vivaldi even makes the adguard for Windows legacy assistant dark to. I'm forced to use the legacy assistant because Sandboxie cannot see any other extension that communicates with adguard for Windows.
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top