portable PM and userContent.css?

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!
User avatar
asik12
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2021-09-05, 16:42

portable PM and userContent.css?

Unread post by asik12 » 2021-09-27, 08:33

I'm using Palemoon-Portable-29.4.0.2, so where to place that css file?
I tried those two folders but I see no change
Here
....\Palemoon-Portable-29.4.0.2\Bin\Palemoon\browser\defaults\profile\chrome
or here
....\Palemoon-Portable-29.4.0.2\User\Palemoon\Profiles\Default\chrome

I just copied very long sample from the mozilas page just to test and see nothing.

Thank you.

Blacklab
Board Warrior
Board Warrior
Posts: 1080
Joined: 2012-06-08, 12:14

Re: portable PM and userContent.css?

Unread post by Blacklab » 2021-09-27, 09:50

Hi asik12,

This is a portable file tree from this answer in a previous forum thread:

file.png

From your post it might be that you are placing your CSS script(s) directly into the 'chrome' folder in your profile? If so, you are missing one further file required to locate your CSS script correctly.

Alternatively, your CSS script may be incorrect in some way and is thus not being parsed... so no change to the browser UI occurs.

CSS scripts need to be placed in the 'userChrome.css' file (or the 'userContent.css' file) within the 'chrome' folder in your Pale Moon profile. This web archive article 'How to Create a userChrome.css File written by jscher2000 in 2017 is worth a read.

You may find it easier and have better control, easier editing, etc... by adding your CSS scripts via the 'Write New Style' option in Lootyhoof's 'Stylem' Addon... this makes editing your CSS script very easy and has a 'Check for Errors' option and useful enable/disable switches built-in... whereas adding the CSS scripts directly to your Pale Moon profile requires a browser restart to activate or edit. :)
Last edited by Blacklab on 2021-09-27, 10:59, edited 3 times in total.

User avatar
asik12
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2021-09-05, 16:42

Re: portable PM and userContent.css?

Unread post by asik12 » 2021-09-27, 10:13

Those two folders I mentioned has 2 short sample css files, so there I placed mine just renaming it correctly.

Thank you.

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

Re: portable PM and userContent.css?

Unread post by coffeebreak » 2021-09-27, 12:19

Your second option is your profile in the portable version, so that is the correct location.

...\User\Palemoon\Profiles\Default\chrome\userContent.css works fine for me in PM Portable.

As mentioned, it needs a browser restart to take effect (and of course, must be saved first).

asik12 wrote:
2021-09-27, 08:33
I just copied very long sample from the mozilas page just to test and see nothing.
It may be that whatever css (written for Firefox) that you copied from the Mz forums doesn't work correctly for Pale Moon.

User avatar
asik12
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2021-09-05, 16:42

Re: portable PM and userContent.css?

Unread post by asik12 » 2021-09-27, 12:56

Well, I may be thick or dumb, but for the test I took one of the sample file in the folder
Palemoon-Portable-29.4.0.2\User\Palemoon\Profiles\Default\chrome
change fonts to 200pt, save as userContent.css restart PM and nada.
It's ridiculous

Code: Select all

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
 * Edit this file and copy it as userChrome.css into your
 * profile-directory/chrome/
 */

/*
 * This file can be used to customize the look of Mozilla's user interface
 * You should consider using !important on rules which you want to
 * override default settings.
 */

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


/*
 * Some possible accessibility enhancements:
 */
/*
 * Make all the default font sizes 200 pt:
 *
 * * {
 *   font-size: 200pt !important
 * }
 */
/*
 * Make menu items in particular 200 pt instead of the default size:
 *
 * menupopup > * {
 *   font-size: 200pt !important
 * }
 */

Blacklab
Board Warrior
Board Warrior
Posts: 1080
Joined: 2012-06-08, 12:14

Re: portable PM and userContent.css?

Unread post by Blacklab » 2021-09-27, 13:29

@asik12:

The script you have copied (in code box above) is still 'hashed out'... i.e the Pale Moon CSS engine is being instructed by your script to ignore the script.

Hashing out is putting a /* in front of and a */ after any item or term in a CSS script that you do not want read and actioned.

This is very useful for writing titles or instructions within a CSS script... and for testing and editing different scripts while not having to delete them from the actual script saved in either your Pale Moon profile or in the Stylem Addon.

Try removing the hashes from active sections of your script...

e.g. This piece of information is deliberately 'hashed-out' so it is not read:

Code: Select all

/*

 * This file can be used to customize the look of Mozilla's user interface
 * You should consider using !important on rules which you want to
 * override default settings.
 
 */
I'm afraid CSS scripting is not very 'plug & play'... sometimes a script you have found will work and sometimes it won't... and likewise writing your own scripts from scratch can be frustrating... patience and trial & error are often required. :)

New Tobin Paradigm

Re: portable PM and userContent.css?

Unread post by New Tobin Paradigm » 2021-09-27, 13:34

God forbid someone does like thousands of former Firefox users have before them and learn how to do things to accomplish what they want. You know, the things that made Mozilla technology so valuable in the first place.

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

Re: portable PM and userContent.css?

Unread post by coffeebreak » 2021-09-27, 14:21

asik12 wrote:
2021-09-27, 12:56
for the test I took one of the sample file in the folder
Palemoon-Portable-29.4.0.2\User\Palemoon\Profiles\Default\chrome
change fonts to 200pt, save as userContent.css restart PM
[...]

Code: Select all

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
 * Edit this file and copy it as userChrome.css into your
 * profile-directory/chrome/
 */

/*
 * This file can be used to customize the look of Mozilla's user interface
 * You should consider using !important on rules which you want to
 * override default settings.
 */

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


/*
 * Some possible accessibility enhancements:
 */
/*
 * Make all the default font sizes 200 pt:
 *
 * * {
 *   font-size: 200pt !important
 * }
 */
/*
 * Make menu items in particular 200 pt instead of the default size:
 *
 * menupopup > * {
 *   font-size: 200pt !important
 * }
 */
In addition to Blacklab's observation:

The example file you copied from was userChrome-example.css (not userContent-example.css).

userChrome.css is used to change the look of the browser itself, while userContent.css is used to style things external to the browser (web pages)* - so make sure to use the correct file, depending on what you want to accomplish.

Edit:
*(the exception would be restyling an internal browser page, the "about:" pages, since they are webpages as well as part of the browser)
Last edited by coffeebreak on 2021-09-27, 14:37, edited 1 time in total.

Blacklab
Board Warrior
Board Warrior
Posts: 1080
Joined: 2012-06-08, 12:14

Re: portable PM and userContent.css?

Unread post by Blacklab » 2021-09-27, 14:27

@asik12:

Whatever you do on your personal voyage to learning some CSS scripting... and it is both fun and useful... DO NOT try that ridiculous '200pt' script you'd found and posted above... :thumbdown:

It will enlarge everything on your screen to enormous sizes... suitable for a cinema screen perhaps... and you will probably lose easy access your browser's controls on a normal laptop or desktop screen! I know... I tried it and had a fun struggle to recover! :wtf:

If you want to try that script out use a much smaller value... try 10pts instead... BEWARE using 200pts! :twisted:

FWIW - Here is my rewritten version of the 'default font sizes' section of the script you posted... but using only 10pts:

Code: Select all


/* --- asik12's script - modified to 10pts --- */ 

/*  
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 
*/

/*  Edit this file and copy it as userChrome.css into your profile-directory/chrome/  */

/*  
This file can be used to customize the look of Mozilla's user interface
You should consider using !important on rules which you want to override default settings.
*/

/* --- Do not remove the @namespace line -- it's required for correct functioning --- */

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


/*  Some possible accessibility enhancements:  */
/*  Make all the default font sizes 10 pt:  */ 


* {font-size: 10pt !important
}


/* --- THE END --- */

Last edited by Blacklab on 2021-09-27, 14:44, edited 1 time in total.

User avatar
asik12
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2021-09-05, 16:42

Re: portable PM and userContent.css?

Unread post by asik12 » 2021-09-27, 14:44

Thank you, it finely got thru.
I just copy this single task as the css file.

Code: Select all

/*Global UI font*/
 * {font-family: Arial Rounded MT !important;
font-size: 15px !important;
}
and it worked.
* What's the !important importance?

Blacklab
Board Warrior
Board Warrior
Posts: 1080
Joined: 2012-06-08, 12:14

Re: portable PM and userContent.css?

Unread post by Blacklab » 2021-09-27, 14:48

asik12 wrote:* What's the !important importance?
You'll have to read up on '!important' online... in simple terms it instructs the CSS engine to override any lesser CSS property. :)

Almost all the CSS scripts you will find in this forum or online... or when you write a script from scratch... will use the '!important' term as you are obviously wishing your script to override everything else in the browser's UI or on a webpage.

Try a search for 'css !important': https://duckduckgo.com/?q=css+!importan ... e35&ia=web

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: portable PM and userContent.css?

Unread post by moonbat » 2021-09-28, 04:10

New Tobin Paradigm wrote:
2021-09-27, 13:34
God forbid someone does like thousands of former Firefox users have before them and learn how to do things to accomplish what they want. You know, the things that made Mozilla technology so valuable in the first place.
That attitude died with the last generation of internet users - people currently over 35. There are a few unicorns among younger people who still try to figure out things first before jumping here to ask questions but they are super rare.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked