Override style per web site in Firefox via userContent.css


Sometimes, the font size on a web site is too small, for example at https://www.retsinformation.dk/ where the font-size is 11.2 pixel. You can override the text size locally, via the userContent.css file.

Also, highlighting links can be useful, to allow tabbing between them.

Add a file named userContent.css file inside the Firefox profile folder (you might have to create it) at ~/.mozilla/firefox/ID_STRING.default/chrome/userContent.css

Then add this:

@-moz-document regexp("http(.+)") {
  a:focus {
    outline: 3px dotted #ccc !important;
    outline-offset: 2px !important;

@-moz-document domain(www.retsinformation.dk) {
  p {
    font-size: 18px !important;

.. and restart the browser, or a new tab. The p font at https://www.retsinformation.dk/ should now be 18px, and all links should have a dotted outline.

If it doesn't work, check that toolkit.legacyUserProfileCustomizations.stylesheets is enabled in about:config.