So I'm trying to get Firefox to use the fonts I want for webpages and for the user menus. I've the same thing in both a userContent.css file and as a style with Stylish.
So far, using it in Stylish makes it apply to my user menus, but userContent.css
does not.
* {
font-size: 16px !important;
font-family: haxrcorp4089 !important;
}
:not( -moz-any(code, pre, tt, var) ) * {
font-size: 16px !important;
font-family: haxrcorp4089 !important;
}
code, pre, tt, var {
font-size: 16px !important;
font-family: terminal !important;
}
So far, this is not working. I don't know much about CSS, so this is a bit annoying just trying to get Firefox to use fonts consistent with my system theme, and still use the terminal fontface for code. Is there something I'm doing wrong here?
Does it matter what's set in my Firefox Options -> Font Settings
in the menus? Is there something I might've changed in about:config
that might be a conflicting setting?
Best Answer
Stylish can apply CSS to both chrome (XUL) and content (HTML) if you don't specify a namespace. Without Stylish, you style chrome with userChrome.css and content with userContent.css.
You have to split up your CSS so each rule is in the proper
user*.css
file.Stylish and namespaces:
Update
If you wanted to style all text including the Firefox GUI with
HaxrCorp 4089
except for HTMLcode
(and similar) elements...userChrome.css:
userContent.css:
Note: Firefox 8+ no longer supports bitmap fonts, so you may have to find a TrueType (TTF) clone or alternative to replace Terminal.
Example
Windows 7, Firefox 3.6.28 (Legacy), Terminal (
font-size: 10px
)