GTK Dark Themes with Firefox

TIL: When using dark GTK+ themes on your Linux desktop, Firefox does not handle them too well as the translation between the Firefox UI toolkit and GTK does have some issues. For instance, these native GTK text inputs on websites are practically unusable:

 

You cannot tell but I actually entered “Takuto” in that field but since it is black text on a very dark background, it is unreadable. This is a known bug in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1283086

Fortunately, Martin Stránský also posted a workaround one can use until this gets resolved. Go into about:config, create a new string “widget.content.gtk-theme-override” with the value “Adwaita:light”. This will make input elements on websites use the default Gnome GTK theme and resolves the issue. Here is the same input after applying this workaround: