MozillaZine

Can't successfully re-create my userChrome.css

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

Post Posted January 12th, 2020, 7:30 pm

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: 169
Joined: January 29th, 2016, 4:36 pm

Post Posted January 13th, 2020, 1:37 am

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.

dickvl

User avatar
 
Posts: 53000
Joined: July 18th, 2005, 3:25 am

Post Posted January 13th, 2020, 10:26 am

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: 597
Joined: March 10th, 2012, 8:08 pm

Post Posted January 13th, 2020, 12:05 pm

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?

dickvl

User avatar
 
Posts: 53000
Joined: July 18th, 2005, 3:25 am

Post Posted January 13th, 2020, 12:21 pm

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.

BuddhaNature

User avatar
 
Posts: 373
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Post Posted January 13th, 2020, 1:48 pm

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.

viewtopic.php?p=14777671#p14777671
OS: Windows 7 Pro. SP1 x64

costark

User avatar
 
Posts: 380
Joined: July 14th, 2004, 5:03 am

Post Posted January 13th, 2020, 2:07 pm

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

Hope you copied real entry Vs typo just in Thread...
Firefox 73 - Win 10-1909 Hm - Dark Theme Why? - Diapers, Politicians, and the Media ... ALL Need Changing for the Same Reason - uBO - Cookie AutoDelete - Privacy Possum- CSS Exfil - Decentraleyes - HTTPS Everywhere - Save Page w-Single (Html) File

dickvl

User avatar
 
Posts: 53000
Joined: July 18th, 2005, 3:25 am

Post Posted January 13th, 2020, 4:06 pm

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;
}

the-edmeister

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

Post Posted January 13th, 2020, 4:30 pm

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: 169
Joined: January 29th, 2016, 4:36 pm

Post Posted January 14th, 2020, 1:48 am

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.

costark

User avatar
 
Posts: 380
Joined: July 14th, 2004, 5:03 am

Post Posted January 14th, 2020, 6:16 am

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"...
Firefox 73 - Win 10-1909 Hm - Dark Theme Why? - Diapers, Politicians, and the Media ... ALL Need Changing for the Same Reason - uBO - Cookie AutoDelete - Privacy Possum- CSS Exfil - Decentraleyes - HTTPS Everywhere - Save Page w-Single (Html) File

Odin2
 
Posts: 597
Joined: March 10th, 2012, 8:08 pm

Post Posted January 30th, 2020, 6:04 pm

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. :)

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 6 guests