How to get user stylesheet working

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
mooniac

How to get user stylesheet working

Unread post by mooniac » 2019-12-14, 14:27

Does anyone know how to get a user stylesheet working in PM 28.7.2 Mac? I've been using a user stylesheet for years in Firefox with no problems (apart from the vagaries and limitations of CSS) but I can't make it work in PM.

I've created a folder called chrome in the profile folder and created the stylesheet, but PM ignores it.

These are the filenames I've tried so far:

Custom.css
user.css
userChrome.css
userContent.css
userCustom.css

I've looked at about:config in the hope of finding something relevant but without success.

General web searching has turned up nothing useful.

The css is correct because I've tried it in Firefox under the filename userContent.css and it works.

Any ideas, anyone?

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to get user stylesheet working

Unread post by coffeebreak » 2019-12-14, 14:53

The following mozillazine knowledge base articles might help...
I have not heard of Custom.css, user.css, or userCustom.css.

mooniac wrote:
2019-12-14, 14:27
I've tried it in Firefox under the filename userContent.css and it works.
If your purpose is to style web pages, userContent.css would be used in Pale Moon as well.
(though you might in the alternative consider using the extension Stylem)

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2860
Joined: 2012-06-28, 01:20

Re: How to get user stylesheet working

Unread post by ron_1 » 2019-12-14, 15:30

Make sure your chrome folder is lower case (i.e., chrome, not Chrome). I made this mistake once.

mooniac

Re: How to get user stylesheet working

Unread post by mooniac » 2019-12-14, 16:48

Thanks, folks, but this is what I've already tried. My stylesheet is in the user library at

Application Support/Pale Moon/Profiles/[gibberish].default/chrome/userContent.css

I know it's there, you know it's there, but PM doesn't know it's there.

I wonder if it could be anything to do with this bizarre business whereby Pale Moon doesn't even know its own name. Sometimes it thinks it's called Pale Moon, sometimes New Moon, sometimes palemoon, sometimes newmoon, occasionally Firefox, etc. However, I've just tried changing the name of the folder in Application Support to New Moon but it didn't help.

Or do I need to add a preference to about:config? Perhaps a string item with the path to the user stylesheet as its value?

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: How to get user stylesheet working

Unread post by vannilla » 2019-12-14, 17:09

Try creating a new profile, maybe something got corrupted given that you say sometimes it calls itself "Firefox".

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2860
Joined: 2012-06-28, 01:20

Re: How to get user stylesheet working

Unread post by ron_1 » 2019-12-14, 17:24

Try putting this in the mac section of the forum, you might get more help there. I'm assuming you have SpockFan02's release? The only other thing I could add is what has already been suggested, try a new profile.
Last edited by ron_1 on 2019-12-14, 18:32, edited 2 times in total.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to get user stylesheet working

Unread post by coffeebreak » 2019-12-14, 17:29

mooniac wrote:
2019-12-14, 16:48
I've just tried changing the name of the folder in Application Support to New Moon but it didn't help.
Don't change the name of the chrome folder.
mooniac wrote:
2019-12-14, 16:48
do I need to add a preference to about:config? Perhaps a string item with the path to the user stylesheet as its value?
No, there's nothing to change in about:config that would be relevant to userChrome/userContent.
As recommended above, please try a new profile.

And by the way, the most current Pale Moon is 28.8.0. To get the Mac version, see here.

mooniac

Re: How to get user stylesheet working

Unread post by mooniac » 2019-12-14, 18:37

A post I made an hour or so ago seems to have got lost in the ether somewhere.

Meanwhile:

1. Creating a new profile doesn't make any difference.

2. I've now discovered that the usercontent.css file is not totally ineffective. It's possible to stop types of elements from displaying (display:none). But it's not possible to apply any constructive styling. Is there some special jargon that needs to be included in the css file to make all normal css comprehensible to PM? I've never had this trouble with Firefox 28.

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: How to get user stylesheet working

Unread post by Lootyhoof » 2019-12-14, 18:51

Another option is to use Stylem, which can apply stylesheets to both the UI and content without a restart.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to get user stylesheet working

Unread post by coffeebreak » 2019-12-14, 19:19

mooniac wrote:
2019-12-14, 18:37
the usercontent.css file
Make sure to capitalize the "C" in the middle of userContent.css and userChrome.css .

mooniac wrote:
2019-12-14, 18:37
Is there some special jargon that needs to be included in the css file to make all normal css comprehensible to PM? I've never had this trouble with Firefox 28.
AFAIK there isn't any "special jargon" that would be different for Pale Moon recognizing the css than for Firefox 28.
If a new profile didn't help, I'm guessing you are doing something incorrectly (procedure-wise) that would also be incorrect in FF28, and/or there's a mistake you've overlooked in whatever you added to userContent.css.

mooniac

Re: How to get user stylesheet working

Unread post by mooniac » 2019-12-14, 19:35

Lootyhoof, welcome to the padded cell.

Yes, I've just been trying Stylem, and it does work.

The problem with Stylem is that PM seems to think of the Stylem stylesheet as the author stylesheet, or part of it. Hence, the cs button in QuickJava doesn’t toggle between author css and user css, as it normally does; it toggles between

the original author css / stylem / a combination of the two
and
the browser defaults, which look like the wrath of Clive Sinclair.
-------------
coffeebreak, yes I know about the capital C. It was only on this page that I forgot. As for the css, as I think I mentioned before, the exact same file works perfectly in Firefox 28.
-------------
By the way, it seems I was wrong about display:none working. I think that was only in Stylem.

So it would still be a truly wondrous thing if somebody could tell me how to get PM to recognise userContent.css.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to get user stylesheet working

Unread post by coffeebreak » 2019-12-14, 19:52

mooniac wrote:
2019-12-14, 19:35
As for the css, as I think I mentioned before, the exact same file works perfectly in Firefox 28.
[...]
So it would still be a truly wondrous thing if somebody could tell me how to get PM to recognise userContent.css.
I believe you are making some mistake without realizing it, though I don't know how to help you figure out what it is. There aren't special rules for doing this in Pale Moon that are different from doing it in Firefox 28.

Is your userContent file by any chance named userContent.css.txt ? if so, remove the ".txt" .

What happens if you disable QuickJava and your other extensions?

mooniac

Re: How to get user stylesheet working

Unread post by mooniac » 2019-12-14, 20:28

No difference. This is pretty clearly a Pale Moon glitch. That, along with the fact that you can't log in to eBay in Pale Moon (Mac), and one or two other things, mean that Pale Moon, though it has its points, is not quite the answer to the great browser question. The Windows version is possibly just about worth keeping, being a little less glitchy than the Mac version.

Thanks to all who've tried to help, but I've decided to call it a day.

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2860
Joined: 2012-06-28, 01:20

Re: How to get user stylesheet working

Unread post by ron_1 » 2019-12-14, 20:32

Moonchild wrote:
So the current Mac development status and progress should be considered experimental, for advanced users only.
This also means it won't get Official branding while in this state because it won't be ready for official releases.

https://forum.palemoon.org/viewtopic.php?f=41&t=15130

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to get user stylesheet working

Unread post by coffeebreak » 2019-12-14, 20:51

ron_1 wrote:
2019-12-14, 20:32
Moonchild wrote:
So the current Mac development status and progress should be considered experimental, for advanced users only.
This also means it won't get Official branding while in this state because it won't be ready for official releases.
https://forum.palemoon.org/viewtopic.php?f=41&t=15130
mooniac wrote:
2019-12-14, 20:28
The Windows version is possibly just about worth keeping, being a little less glitchy than the Mac version.
Does your userContent.css stuff work on your Windows machine (since your post implies you've used Pale Moon on Windows)?