What is the code/rules for userChrome.css? [Solved]

User Help for Mozilla Thunderbird
Post Reply
kenj69
Posts: 15
Joined: February 8th, 2018, 8:18 pm
Location: West of Seatlle

What is the code/rules for userChrome.css? [Solved]

Post by kenj69 »

I am really confused regarding the proliferation of HTML sub-types. I have looked at CSS, XML, XUL, XHTML and on, and on. Please tell me - what is the coding technology and what are the coding rules to follow? I am trying to understand and edit the userChrome.css - and it seems to me that it doesn't follow CSS rules! Here is my current file:

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* http://kb.mozillazine.org/Pane_and_menu_fonts */
/* Global UI font - the leading '*' is not a typo*/
* { font-size: 10pt !important;
font-family: Century SchoolBook !important; 
}

#folderTree treechildren::-moz-tree-row(odd) {
  background-image: url("chrome://messenger/skin/icons/row.png");
  background-position: bottom;
  background-repeat: repeat-x;}
What is the meaning of "*" and "#" at the beginning of the line? Why is every section marked as !Important? If it wasn't important we wouldn't put it in there! I can't find a rule for those anywhere. I hope I'm not just getting too old for this.

-=Ken=-
Last edited by kenj69 on February 22nd, 2018, 10:19 pm, edited 2 times in total.
Linux KDE Neon 5.12 running on homebrew AMD Ryzen 3 1200 / ASRock MB
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: What is the code/rules for userChrome.css?

Post by tanstaafl »

Its all CSS as far as I know. See https://developer.mozilla.org/en-US/docs/Web/CSS . Another useful writeup is https://www.w3schools.com/Css/css_syntax.asp

!important changes the priority. See https://www.thoughtco.com/what-does-imp ... ss-3466876

An asterisk is a wild card. See https://stackoverflow.com/questions/120 ... s-selector

/* and */ are used to mark the beginning and end of comments

"# is an id selector, used to target a single specific element with a unique id, but . is a class selector used to target multiple elements with a particular class." See https://stackoverflow.com/questions/602 ... -of-styles
kenj69
Posts: 15
Joined: February 8th, 2018, 8:18 pm
Location: West of Seatlle

Re: What is the code/rules for userChrome.css?

Post by kenj69 »

Thanks tanstaafl,

It is expected for a person to do their "homework" - but it would have taken me hours and mounting frustration to find the answers you just gave me. -Bookmarked- None of the css tutorials addressed the questions I had - at least as far as I got in them. You have saved me a great deal of time and I appreciate that.

It now seems safe to assume that the userChrome.css directives are overriding and taking precedence over the default or originally programmed values. Now I get it. Thanks again!

-=Ken=-
Linux KDE Neon 5.12 running on homebrew AMD Ryzen 3 1200 / ASRock MB
Post Reply