Firefox GTK Theme – Make Firefox Use GTK Theme on Browser Chrome Only

firefoxgtkthemes

I have a dark GTK theme, I don't want firefox to ignore it all together, I only want the theme to effect Firefox's chrome (the buttons, address bar, bookmarks bar, etc., etc.), but I want the theme to be ignored by websites, websites should not be themed by the browser! It's a sin, and it makes everything look like absolute crap. If anyone has any idea how to fix it, that would be great, thanks!


Edit: In the image below, the top panel shows that text entered in the search box is nearly invisible when the "dark theme" is applied; the lower panel shows text clearly visible when the dark theme isn't applied.

Text in Google's search box

Best Answer

I hope I understand your situation correctly. It seems somewhat related to High contrast theme Firefox problem and to Need to modify gnome 3 theme for browser. And my answer below is essentially that which I provided to those questions!

Close (exit) all instances of Firefox. Go to your profile folder. It is here: ~/.mozilla/firefox/randomstring.default. In there, look for a subfolder called chrome.
If it doesn't exist, create it.
To create the chrome folder you can use your file manager (or the command line with mkdir chrome).
If chrome does exist, look for a file called userContent.css. Otherwise, create an empty text file with this name in the chrome folder. Now open userContent.css with a text editor and paste in or append this code:

INPUT, TEXTAREA {color: black !important; background: #aaaaaa !important; }

Save the file (as plain text) and close the text editor. Restart Firefox. You should now have black text on a light gray background. You can use whatever color combination you prefer.

Notes: chrome and userContent.css are case-sensitive and should be spelled correctly. The settings here will take precedence over those in the OS theme and will remain the same in Firefox irrespective of which gtk theme you switch to.

Related Question