I'm running Linux, and I use Firefox Extended Support Release, 52.6.0, because I depend on certain accessibility/usability extensions which don't work in Firefox Quantum.

I have a small laptop screen with somewhat high resolution, which makes the default Firefox UI font unreadable for me.

I figured out that I can change the UI font size of most applications with an ~/.Xdefaults setting:

Xft.dpi: 192

This works for things like Gedit and i3, but for some reason Firefox ignores it.

I tried another workaround I found on support.mozilla.org, changing layout.css.devPixelsPerPx to 1.25 in about:config. On my version of Firefox this changes the size of pretty much everything but the UI text font.

Another suggestion from support.mozilla.org is to use an extension called "Theme and Font Size Changer". However, since the release of Firefox Quantum this extension seems to have been modified to no longer support changing font sizes (it only allows me to change the colors!).

I tried halving my screen resolution with xrandr (to 640x400), but this breaks many things, for instance various dialog boxes such as print dialogs no longer fit on the screen.

Is there a better solution?

While trying to solve this problem I learned about userChrome.css. It is a configuration file allowing users to change properties of the Firefox UI, using the cascading style sheets language. It works on Firefox 52.

The file does not exist by default; I created it and added the following text:

$ cat ~/.mozilla/firefox/*.Default\ User/chrome/userChrome.css        
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

* {
font-size: 16pt !important

Don't forget the semicolon after the @namespace line.

Amazingly, there is a whole website, userchrome.org, dedicated to things you can put in this file. However, the above simple snippet was all I needed. I didn't get it from userchrome.org but from a post on mozillazine.org. On my system the font-size trick is also to be found in a file userChrome-example.css in the same chrome/ directory.

Now I can read the menubar text and tab names and so on, with my screen at full resolution.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.