macOS-userChrome.css has no effect but userContent.css is

Discussion of bugs in Mozilla Firefox
Post Reply
Drayon
Posts: 93
Joined: April 9th, 2003, 6:47 pm

macOS-userChrome.css has no effect but userContent.css is

Post by Drayon »

On macOS i'm trying to use a custom font for ONLY the user interface.

All reports continue to suggest (applies also to Quantum)
modifying userChrome.css affects the UI
Modifying userContent.css affect web page display.

This is NOT at all my experience on macOS with Quantum. Maybe this does for Linux or Windoze but not macOS.

my css code in userChrome.css has ZERO effect

my css code ONLY has an effect in userContent.css

This is undesirably affecting Quantum GLOBALLY, that is, the entire UI is using the Font (as I want) as well as every single webpage which I do not want.

I want websites to use their own fonts, I just want to control the UI font.

I wish Firefox just gave us a preference to select a custom style for web page display that would isolate the code from the UI and allow us to continue to use userChrome.css for UI modifications.

My code:
======================================
*{
font-family: "Titillium Web" !important;
font: "TitilliumWeb-Regular" !important;
font-size: 9pt !important;
}
======================================


Anyway so who knows what is going on or have we can enter a specific exclusion in the css to not affect webpage content?

Thanks
User avatar
therube
Posts: 21703
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: macOS-userChrome.css has no effect but userContent.css i

Post by therube »

(Basically a bump, for that 1 other Mac user out there...)

I haven't really paid attention, but some remarks about not including the "header" lines in the .css file (that in the past have pretty much been required), so maybe try without them?

Code: Select all

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: macOS-userChrome.css has no effect but userContent.css i

Post by Brummelchen »

nah.
userChrome is for pages and
userContent for Firefox UI
NOT vice versa.

for pages start with

Code: Select all

@-moz-document domain("www.desired-webpage.com") {
/*content*/
}
fore firefox i have nothing or like this specific

Code: Select all

@-moz-document  url-prefix(chrome://mozapps/content/extensions/extensions.xul) {
/*content*/
}
eg. for about:addons

Code: Select all

@-moz-document  url-prefix(about:addons) {
/*content*/
}
for some reason this is no longer needed in the new addon manager!

userContent is limited to firefox only automatically, although i also have code for the UI concerning the UI, eg addressbar or some space.
User avatar
Eckard
Posts: 1414
Joined: September 5th, 2011, 8:17 am
Location: Paris (not TX)

Re: macOS-userChrome.css has no effect but userContent.css i

Post by Eckard »

Drayon wrote:On macOS i'm trying to use a custom font for ONLY the user interface.

My code:
======================================
*{
font-family: "Titillium Web" !important;
font: "TitilliumWeb-Regular" !important;
font-size: 9pt !important;
}
======================================
I'm a bit late but your css code works in my userChrome.css file (macOS / Firefox 68.0.1).
I just used 12pt and added color:red !important; to make the changes more visible :


Image
Drayon
Posts: 93
Joined: April 9th, 2003, 6:47 pm

Re: macOS-userChrome.css has no effect but userContent.css i

Post by Drayon »

Brummelchen wrote:nah.
userChrome is for pages and
userContent for Firefox UI
NOT vice versa.
nah bruv it def this:

userContent for Page CONTENT
userChrome for Firefox UI

That's the way it has been for 20 years and it USED to also affect the font in Preferences, it no longer does, it ain't global anymore.

Now my complication is that I used extension 'Vertical Tabs Reloaded' and I was trying to force the font type/size for the text in the Tabs, expecting it to be part of the FF UI. BUT, userChrome was not controlling it, userContent was yet userChrome is changing the font in the url bar and context menus etc.

It has definitely but for userContent to have any affect the user must go preferences>fonts>advanced>Uncheck "Allow pages to choose their own fonts, instead of your selections above"
Drayon
Posts: 93
Joined: April 9th, 2003, 6:47 pm

Re: macOS-userChrome.css has no effect but userContent.css i

Post by Drayon »

Eckard wrote:
Drayon wrote:On macOS i'm trying to use a custom font for ONLY the user interface.

My code:
======================================
*{
font-family: "Titillium Web" !important;
font: "TitilliumWeb-Regular" !important;
font-size: 9pt !important;
}
======================================
I'm a bit late but your css code works in my userChrome.css file (macOS / Firefox 68.0.1).
I just used 12pt and added color:red !important; to make the changes more visible :


Image
Yeah, you confirmed correctly, userChrome does still control the UI.
I've since discovered my addon Vertical Tabs Reloaded is not following convention, it is using userContent instead causing confusion because it is part of the UI and the tab text font type and size I was tryig to control was not affecting it with userChrome.

Anyway i've got it figured out now.

Thanks for your efforts and time reconfirming correct functionality of userChrome.
Post Reply