I'm using a dark GTK theme. The non-chrome part also uses my GTK theme, which is annoying because the buttons and inputs are black and many sites set the text color of them to dark grey so I can't easily read the text on them. So, how can I make sure that Firefox doesn't use my GTK theme in the non-chrome part?
3 Answers
You can specify a light GTK theme to use for rendering webpages in about:config
. This is great because your system theme will still apply for menus, etc., but the webpages will be rendered as they are with light themes.
- Navigate to
about:config
in your Firefox browser - Right click and select "New"→"String"
- Enter
widget.content.gtk-theme-override
as the name - Enter a light GTK theme that you have installed on your system for the value. e.g., "Arc"
- Restart Firefox
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1283086

- 155
Type about:config on the URL, and them find this entry:
browser.display.use_system_colors
Change it to false.

- 6,628
-
1It was already false by default, see https://i.imgur.com/U52T15a.png… – wb9688 Aug 03 '16 at 08:13
cd ~/.mozilla/firefox/
In this, look for the directory that ends in .default
here and enter it.
If you see a directory chrome
under that, enter that, otherwise create that.
Then, create a file userContent.css
and add the below code to it.
input:not(.urlbar-input):not(.textbox-input):not(.form- control):not([type='checkbox']) {
-moz-appearance: none !important;
background-color: white;
color: black;
}
#downloads-indicator-counter {
color: white;
}
textarea {
-moz-appearance: none !important;
background-color: white;
color: black;
}
select {
-moz-appearance: none !important;
background-color: white;
color: black;
}
In the end, you should have a file /home/<user>/.mozilla/firefox/<profile>.default/chrome/userContent.css
with the code above.
I had the same problem with dark theme, and after fiddling around with options for days, this was the only thing that fixed it. I can't find the original source of this now, but will add it as a comment if I find it later. But there is this other similar fix that you can try if mine doesn't work.

- 3,332