Can't successfully re-create my userChrome.css

User Help for Mozilla Firefox
Post Reply
Odin2
Posts: 801
Joined: March 10th, 2012, 8:08 pm

Can't successfully re-create my userChrome.css

Post by Odin2 »

I'm setting up my new Win10 computer and want to create the same userChrome.css file as in my Win7 computer. First I changed to true the about:config value of toolkit.legacyUserProfileCustomizations.stylesheets. Then I went to [my name]\AppData\Roamimg\Mozilla\Firefox\Profiles. At that location there were two "default" folders. I created a userChrome.css file first in one and then in the other of these, and manually started copying to them from my win7 userchrome text file. I saved the new files, and restarted Fx, but the intended changes in my Firefox interface did not occur. Here are the portions of my Win7 userChrome that I copied:

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

#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display:none!important; }

titlebar-button {
display: none !important;
}

.titlebar=spacer[type=post-tabs"]{
display: none !important;
}

#pageActionSeparator {
display: none !important}

#urlbar-zooom-button {
display: none !important}

* * * * *

Can you tell me where I went wrong?
siffemoz
Posts: 253
Joined: January 29th, 2016, 4:36 pm

Re: Can't successfully re-create my userChrome.css

Post by siffemoz »

Not sure why you have 2 default folders, but you can go to about:profiles and delete the one you're not on at the time. As for userChrome.css, try commenting out the @namespace line.
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Re: Can't successfully re-create my userChrome.css

Post by dickvl »

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current profile folder.

Did you create a chrome folder and placed userChrome.css in this folder ?
Also make sure that userChrome.css doesn't have a hidden .txt file extension.
Odin2
Posts: 801
Joined: March 10th, 2012, 8:08 pm

Re: Can't successfully re-create my userChrome.css

Post by Odin2 »

Dickvl, my userChrome.css is in a created Chrome folder.

Windows tells me that my userChrome.css is a "text document." Is that the problem? If so, how can I correct it?
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Re: Can't successfully re-create my userChrome.css

Post by dickvl »

Yes, if userChrome.css is a text file then the file has a hidden .txt file extension.
Best is probably to create a new file copy paste the text to this file.
When you save the file in the text editor make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".
You can also enable seeing all file extensions.
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: Can't successfully re-create my userChrome.css

Post by BuddhaNature »

Odin2, here is step-by-step guide to creating a userChrome.css file. Follow it step-by-step and you should be able to get your userChrome.css file to work. It also covers the issue of Windows thinking the file you have is a 'text' file and how to fix that.

http://forums.mozillazine.org/viewtopic ... #p14777671
OS: Windows 10 Pro. x64
User avatar
costark
Posts: 548
Joined: July 14th, 2004, 5:03 am

Re: Can't successfully re-create my userChrome.css

Post by costark »

@namespace url line: Your Colon is MISSING after http .......... ("http//www.mozilla.org

Hope you copied real entry Vs typo just in Thread...
W10 22H2 - SSD-HDD i5 12G -
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Re: Can't successfully re-create my userChrome.css

Post by dickvl »

It is also .titlebar-spacer with a dash and not a '=' and with quotes.
.titlebar-button is a class name and needs a leading '.'

Code: Select all

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

#tabbrowser-tabs .tabbrowser-tab .tab-close-button {
  display:none!important;
}

.titlebar-button {
  display: none !important;
}

.titlebar-spacer[type="pre-tabs"], 
.titlebar-spacer[type="post-tabs"] {
  display: none !important;
}
User avatar
the-edmeister
Posts: 32249
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Re: Can't successfully re-create my userChrome.css

Post by the-edmeister »

Odin2 wrote:Dickvl, my userChrome.css is in a created Chrome folder.

Windows tells me that my userChrome.css is a "text document." Is that the problem? If so, how can I correct it?
Not a capital C - it has to be a lower case c - as in chrome.
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
siffemoz
Posts: 253
Joined: January 29th, 2016, 4:36 pm

Re: Can't successfully re-create my userChrome.css

Post by siffemoz »

the-edmeister wrote:
Odin2 wrote:Dickvl, my userChrome.css is in a created Chrome folder.

Windows tells me that my userChrome.css is a "text document." Is that the problem? If so, how can I correct it?
Not a capital C - it has to be a lower case c - as in chrome.
The file name has to be userChrome.css with a capital C. The folder name can be Chrome or chrome. But the file type should say Cascading Style Sheet Document, not Text Document.
User avatar
costark
Posts: 548
Joined: July 14th, 2004, 5:03 am

Re: Can't successfully re-create my userChrome.css

Post by costark »

siffemoz wrote:
the-edmeister wrote:
Odin2 wrote:Dickvl, my userChrome.css is in a created Chrome folder.

Windows tells me that my userChrome.css is a "text document." Is that the problem? If so, how can I correct it?
Not a capital C - it has to be a lower case c - as in chrome.
The file name has to be userChrome.css with a capital C. The folder name can be Chrome or chrome. But the file type should say Cascading Style Sheet Document, not Text Document.
I think I erred originally with -- Save As -- for the NEWLY Created userChrome.css by choosing or writing - .txt - After .css VS Save As All Files.
userChrome.css Save As -- All Files -- via drop-dn arrow worked for me.
Problem starts for us non-experts by seeing -- Create a new text file inside the chrome folder named userChrome.css ...& I don't think earlier instructions warned of No ".txt"...
W10 22H2 - SSD-HDD i5 12G -
Odin2
Posts: 801
Joined: March 10th, 2012, 8:08 pm

Re: Can't successfully re-create my userChrome.css

Post by Odin2 »

Thanks, siffemoz, dickvl, BuddhaNature, costark, and the-edmeister. As my complete userChrome file is rather long, I've opted to copy my old one electronically using my thumb drive; and that seems to have worked out fine. I'm grateful however for all your good advice. :)
Post Reply