How to fix dark theme issues with Firefox in Linux

By Mike Johnston October 2, 2017 Articles and Editorials

It took me quite a long time to finally figure this out but thanks to some handy guides out there (and some people that are clearly smarter than me) I did.

My issue was that text in fields was barely visible:

To fix this, in your home folder, navigate to:

~/.mozilla/firefox/<profile directory>/

Note: the profile directory will usually be a random set of letters and numbers such as zee4bhai.default or similar. Enter this directory and check to see if you have a /chrome folder. If not, create it with mkdir chrome and enter it.

Now create a new file called userContent.css like so (subbing out your preferred editor of course):

nano userContent.css

Paste the following into the file and save:

input {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

textarea {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

select {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

input[type="radio"],
input[type="checkbox"] {
  border: 2px inset white ! important;
  background-color: white ! important;
  color: ThreeDFace ! important;
  -moz-appearance: none !important;
}

*|*::-moz-radio {
  background-color: white;
  -moz-appearance: none !important;
}

button,
input[type="reset"],
input[type="button"],
input[type="submit"] {
  border: 2px outset white;
  background-color: #eeeeee;
  color: black;
  -moz-appearance: none !important;
}

body {
  background-color: white;
  color: black;
  display: block;
  margin: 8px;
  -moz-appearance: none !important;
}

Now restart Firefox and you should be good to go!

Happy browsing!

Mike

Mike Johnston

Mike Johnston Author

Mike started CMS Critic in 2008 and has become a recognizable face and valued expert in the world of content management. He has worked with many small business and enterprises to establish their online presence and to assist with marketing strategies. If you are interested in working with him, drop him a line.

About CMS Critic

CMS Critic is one of the top resources on the web for unbiased, honest reviews. Since 2008, we've provided a resource for readers worldwide to find information, get advice and discover the latest news about software, hardware and services such as Content Management Systems, Website Builders, Linux Distributions and much more. To learn how to contribute or work with us, drop us a line.

Follow Us