Make firefox only use GTK theme on browser chrome, but ignore on websites

11,168

For some reason I couldn't get the accepted answer to work, so I wrote a small Greasemonkey script to achieve the same effect: https://gist.github.com/einarmagnus/d741e30ad13b051d7971

// ==UserScript==
// @name        bright forms
// @namespace   einar
// @description Make all form elements default to light style to combat gtk theme
// @include     *
// @version     1
// @grant       none
// ==/UserScript==
function addDefaultCssRules(rule) {
  var styleElement = document.createElement('style');
  styleElement.type = 'text/css';
  document.head.insertBefore(styleElement, document.head.firstChild);
  styleElement.sheet.insertRule(rule, 0);
}
addDefaultCssRules('input, button, textarea, select { background-color:#fff;border-radius:5px;color:#111 }');

This worked for me.

Share:
11,168

Related videos on Youtube

KoRnKloWn
Author by

KoRnKloWn

Updated on September 18, 2022

Comments

  • KoRnKloWn
    KoRnKloWn almost 2 years

    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