MozillaZine

[SOLVED] Importing other style sheets into userChrome.css

User Help for Mozilla Firefox
MarkRH

User avatar
 
Posts: 1227
Joined: September 12th, 2007, 2:30 am
Location: Oklahoma City, OK

Post Posted January 28th, 2018, 12:54 am

Someone sent me feedback that since the XUL stuff has been going since v54 or something, don't even need that @namespace line now. I took mine out and all my userChrome.css code still works fine. After reading Adding Style Recipes to userChrome.css it seems to depend on exactly what you want done.

xanthon
 
Posts: 160
Joined: December 17th, 2005, 11:55 pm

Post Posted January 28th, 2018, 1:54 am

@dickvl Thanks. I have added the @namespace line to all three files and will report back after I have run Firefox quantum again.

@MarkRH Thank you also. I have read that page also. The author is the same contributor to the support.mozilla.org page to which I referred earlier.

Frank Lion

User avatar
 
Posts: 19844
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted January 28th, 2018, 9:25 am

MarkRH wrote:Someone sent me feedback that since the XUL stuff has been going since v54 or something, don't even need that @namespace line now. I took mine out and all my userChrome.css code still works fine.

Yeah, I know, it's always been like that and 95% of the time you'll get away with it. Sometimes the same is true with the use of !important, trailing braces on wrapped @ stuff, semi-colons in the code, etc. etc. In other words, you have discovered nothing new -

Frank Lion wrote:Yes, I know. (that's me answering in advance the usual 'actually, you can actually use display: none !important there, actually' stuff)

viewtopic.php?p=13441517#p13441517

I get it, people want to feel special and think they have discovered some secret that everyone else is too stupid to have ever seen. They haven't.

Meantime, I have to quickly write thousands of lines of original bomb-proof code that will not break across 100 Linux distros, Windows XP, Win7 and Win10 and Mac. I learnt years ago that the way to do that is to not get clever, keep the code simple and also stick to best practice.

On this thread, I replicated the code just as it was written here and it worked for me, but not for the OP....is that because I'm on a Linux OS and they are not? Who knows? It's not me with the problem.

https://developer.mozilla.org/en-US/doc ... Namespaces
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

xanthon
 
Posts: 160
Joined: December 17th, 2005, 11:55 pm

Post Posted January 28th, 2018, 3:30 pm

Frank Lion » 29 Jan 2018 02:25 am wrote:On this thread, I replicated the code just as it was written here and it worked for me, but not for the OP....is that because I'm on a Linux OS and they are not? Who knows? It's not me with the problem.


I am also using a Linux system.

The file searchbar.css is now imported following the insertion of the namespace line in that file, in tabbar.css and in userChrome.css.

the-edmeister

User avatar
 
Posts: 32034
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted January 29th, 2018, 4:00 am

This is how my userChrome.css looks. The "scraps" of code which (probably) need that gatekeeper code line are added at the end of the file where they will be read last.

Code: Select all
/* userChrome.css for Quantum Fx 57 */

@import url("search-bar-names-std.css");
@import url("selected-and-not-tabs.css");
@import url("bookmarks-sidebar.css");
 
/* ------------------------------ */

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

/* Tab while loading */
.tabbrowser-tab[busy] {
  color: red !important;}
.tabbrowser-tab[unread] {font-style: italic;}


A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.

Frank Lion

User avatar
 
Posts: 19844
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted January 30th, 2018, 5:00 am

xanthon wrote:I am also using a Linux system.

Yeah, I know, it's written across the bottom of every one of your posts here. It's almost as though I was drawing attention to the fact of how different Linux distros can behave, isn't it?
...bomb-proof code that will not break across 100 Linux distros


xanthon wrote:The file searchbar.css is now imported following the insertion of the namespace line in that file, in tabbar.css and in userChrome.css.

No comment.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

xanthon
 
Posts: 160
Joined: December 17th, 2005, 11:55 pm

Post Posted January 30th, 2018, 3:50 pm

dickvl Posted 28 Jan 2018 04:26 pm wrote:Each file you import in userChrome.css needs to have the @namespace line at the start of the file.
userChrome.css needs this line as well, but all @import rules need to be before the @namespace line in userChrome.css.

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot] and 14 guests