Firefox: Black form input fields when using a dark GTK / Gnome theme

firefox

I recently switched to a dark Gnome2 theme and realized, that firefox did use that colors too. But also firefox used these colors for the input forms on some websites. I found out how to partially fix this.

These strangely colored input field will be there when the website did not define any other colors to these elements.

There is a way to make these fields white again with the following instructions:

You need to create or append this file

.mozilla/firefox/YOUR_PROFILE/chrome/userContent.css

with this content:

/**
* Default colors for HTML-Forms when using dark GTK Themes.
*
* @author Julius Beckmann kontakt@juliusbeckmann.de
*/

button,
input,
input[type="radio"],
input[type="checkbox"],
input[type="reset"],
input[type="button"],
input[type="submit"],
select,
textarea {
-moz-appearance: none !important;
background-color: white;
color: black;
}

Download: userContent.css

It will give Firefox default values to use when a website does not set any colors for form inputs.
You need to restart Firefox to activate these settings.

You can test it here: Test-Forms

But the check-box input fields are still black. I think because Firefox does not render these Elements on its own, but let GTK do it. I could not find any method to reset these to normal again.

No related posts.


 
 
 

4 Kommentare zu “Firefox: Black form input fields when using a dark GTK / Gnome theme”

  1. Linda 13. Dezember 2012 um 11:20

    Danke!
    Hat mir geholfen mit Firefox 17 auf Kubuntu 12.10 / KDE 4.9 und dunklem Thema :)

  2. Scotty 17. Februar 2013 um 12:40

    Thanks a lot! I was looking for a solution for days.

  3. mehdi 14. Oktober 2013 um 00:00

    thanks

  4. navhaxs 26. Oktober 2013 um 13:32

    Hi there! Thanks for the fix, now I can use my fav MediterraneanNight gtk theme without getting bothered by issues with Firefox :)