7

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?

wb9688
  • 739

3 Answers3

4

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.

  1. Navigate to about:config in your Firefox browser
  2. Right click and select "New"→"String"
  3. Enter widget.content.gtk-theme-override as the name
  4. Enter a light GTK theme that you have installed on your system for the value. e.g., "Arc"
  5. Restart Firefox

Source: https://www.reddit.com/r/firefox/comments/6rbvvw/photon_rectangular_tabs_have_landed_in_nightly/dl4318f/

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1283086

rviertel
  • 155
0

Type about:config on the URL, and them find this entry:

browser.display.use_system_colors 

Change it to false.

0

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.

Munir
  • 3,332