8

I switched to a dark theme (Dolorean Dark). I like it and I think--it is better for eyes. However I have problems in some web pages. Most pages are intended to be shown on white background. On dark theme form controls have black background and mostly the font is also black, so the content of forms are invisible. I would like to use white theme on web pages in Firefox.

0

5 Answers 5

10

The best solution to tell Firefox that it should use the light theme instead of the dark is by specifying the GTK_THEME variable prior to launching.

So, 4 ways you get for doing this..

1- from terminal you can do:

GTK_THEME=Adwaita:light firefox

2- if you hate the terminal and wanna close it once firefox works:

GTK_THEME=Adwaita:light firefox &

3- from firefox about:config you can set the following setting to false:

browser.display.use_system_colors

WON'T WORK FOR localhost SITES! so if you are a web developer/designer it won't work out that well for you.

4- if you want this to be the defualt behavior:

Just add two lines to the Firefox launcher script located at /usr/lib/firefox/firefox.sh

in the terminal type down:

sudo gedit /usr/lib/firefox/firefox.sh

look at the beginning of the script for this:

MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox

export MOZ_APP_LAUNCHER

and change it to this:

MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
GTK_THEME=Adwaita:light

export MOZ_APP_LAUNCHER
export GTK_THEME

Finally, restart Firefox.

Hope this helps.

Please help me by voting this up.

Thank you :)

0
7

changing userContent.css solves problem ; more information is here also dolerean theme comes with the firefox tweak more information is here; just installing it is enough

3
  • 3
    +1 because it works. Would be nice however if you had included the working userContent.css in your answer.
    – Bruni
    Mar 23, 2016 at 14:50
  • 1
    Now this solution does not work anymore for firefox 56+.
    – kirin
    Oct 6, 2017 at 8:01
  • it has been five years and firefox still has this problem. I insist on using it and for a long time I use "env GTK_THEME=Adwaita:light firefox" command created as desktop icons.
    – bkilinc
    Oct 7, 2017 at 8:30
0

You cannot do anything with it, except changing to a white theme!

EDIT: This is wrong. Please check the below comment given by OP for correct answer

5
  • The solution itself is changing to white theme. May be my language is bad, edited it.
    – mac
    Oct 5, 2012 at 8:20
  • changing userContent.css solves problem ; more information is here ubuntuforums.org/showthread.php?t=1715679 also dolerean theme comes with the firefox tweak more information is here; just installing it is enough gnome-look.org/content/show.php/DeLorean-Dark?content=153866
    – bkilinc
    Oct 5, 2012 at 13:33
  • Ohh nice. Instead of posting this as comment, post this as answer to your question(you can answer your own question). In that way, people who see this question later can get answer directly :)
    – mac
    Oct 6, 2012 at 4:45
  • thx. That was my intention. I was in a hurry and posted in wrong place :)
    – bkilinc
    Oct 6, 2012 at 6:16
  • you just posted answer, accept it as answer :) (by selecting the tick mark on the left)
    – mac
    Oct 6, 2012 at 13:10
0

To add on to Bannaz's answer, use

env GTK_THEME=Adwaita:light firefox

if you want to launch via desktop/panel icon or keyboard shortcut.
This also means you don't have to modify /usr/lib/firefox/firefox.sh
Firefox 57 includes dark theme which can be enabled via Add-ons->Themes->Dark. Screenshot. This theme doesn't apply on webpage. Note: I'm using Ubuntu MATE 17.10

Alternatively, you can use this add-on (credit to koushik), or this add-on to apply the userContent.css (credit to bkilinc) in Firefox 57+.

I'm using Ubuntu MATE 17.10

0

Use the Stylish add-on for Firefox and make a new global style:

html input,
html textarea,
html select,
html button,
html input[type="reset"],
html input[type="button"],
html input[type="submit"],
html input[type="radio"],
html input[type="checkbox"] {
    background-color: inherit;
    color: #333333;
    -moz-appearance: none;
} 

Below is a picture of the extension configuration, showing Gnome dark theme still applied to the window borders. Local sites still display the dark theme.

Picture

Not the answer you're looking for? Browse other questions tagged .