Skip to content

Instantly share code, notes, and snippets.

@0xE0-rng
Last active October 17, 2018 19:22
Show Gist options
  • Save 0xE0-rng/2ec3aa4a87ff72fe6f5fa2178be28882 to your computer and use it in GitHub Desktop.
Save 0xE0-rng/2ec3aa4a87ff72fe6f5fa2178be28882 to your computer and use it in GitHub Desktop.
Fix Black Text On Black Boxes (fixes problems with Nitrogen and GTK dark themes)
==UserScript==
// @name Bright Forms
// @namespace einar
// @description Make all form elements default to light style to combat gtk theme
// @include *
// @version 1
// @grant none
// @author https://www.reddit.com/r/firefox/comments/58uyhp/the_dark_gtk_theme_and_firefox_buttonstextboxes/
// ==/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 }')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment