kjg

Well-Known Member
Mar 2, 2004
158
3
168
Is there any simple way to just override the current styles css?
Like adding a custom.css somewhere and it will be read last and that way override any other style

Would be a very easy way to get rid of some problems with paper lantern without having to create a new style.

// kjg
 

kjg

Well-Known Member
Mar 2, 2004
158
3
168
Hi Infopro,
Thank you for the links, and I have reread those and a number of other documents and forum posts.
Unfortunately I do not understand it all. More used to work with CMS style overrides and the concept here doesn't seem to be override but instead replace.

Cannot find anywhere that it is possible to just add a custom.css to override existing css

As I understand It, I need to create a complete new style, add it to /var/cpanel/customizations/styled/thenewstyle/ and after that symlink that style to /var/cpanel/customizations/styled/default_style

But I only want to be able to change a couple of elements in the style.css via a custom style.css or similar.

Probably it is me not understanding, but to try to explain:

If I want to create a whole new style, I create it as above and add it to all users as above. But that makes all accounts using that style and if they change later to another style, the css added there will naturally not be in action.
Also updates to paper lantern will not be reflected in this added style so updates have to be added manually each time it is updated.

If possible I only want to override the style.css so regardless of what style the user chooses to use, that custom.css will be in action

If that is not possible, I can set paper lantern retro as style for all accounts and stop the possibility to change style for the accounts, but I still want updates to paper lantern and retro to be used.

So it is a simple override I am looking for.

Is this possible somehow?

// kjg
 

kjg

Well-Known Member
Mar 2, 2004
158
3
168
Infopro
Well, that was not helpful. If I say that I have reread those documents and that I maybe do not understand them and because of this asks a question here on the forum, I do not think such an answer is called for
 

Infopro

Well-Known Member
May 20, 2003
17,113
511
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
My apologies. I'm unclear what you're hoping for here. You asked about modifying the CSS and I provided you links to docs that explain how to do it. If those docs don't make any sense to you, how could your custom CSS overrides be better than the proper way of working with the style, explained in those docs?
 

kjg

Well-Known Member
Mar 2, 2004
158
3
168
Unfortunately english is not my native language, as it is not for a lot of people out there. ( Yes, I know this might come as a surprise to all of you english speaking people :)

So even if I have read the documents several times, I do not understand them.

I am not saying anything is better or worse.
I am only asking how to do this.

Are you saying that if I only create a new style folder: /var/cpanel/customizations/styled/thenewstyle/ and adds only a styles.css with only one element in it (lets say p {color:#ff0; } and symlink that folder to /var/cpanel/customizations/styled/default_style the color on all p elements regardless of styule chosen by the cpanel account user will be #ff0 ?
 

Infopro

Well-Known Member
May 20, 2003
17,113
511
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Unfortunately english is not my native language, as it is not for a lot of people out there. ( Yes, I know this might come as a surprise to all of you english speaking people :)
Yea, that's not helpful here either. Thanks for the clarification though.


So even if I have read the documents several times, I do not understand them.

I am not saying anything is better or worse.
I am only asking how to do this.
The docs explain how.
Guide to cPanel Interface Customization - cPanel Style Development - Software Development Kit - cPanel Documentation

Are you saying that if I only create a new style folder: /var/cpanel/customizations/styled/thenewstyle/ and adds only a styles.css with only one element in it (lets say p {color:#ff0; } and symlink that folder to /var/cpanel/customizations/styled/default_style the color on all p elements regardless of styule chosen by the cpanel account user will be #ff0 ?
No. And I suppose that's your real question here isn't it?

the color on all p elements regardless of styule chosen by the cpanel account user
I can't assist you with this way of doing things. Someone may be able to help you more there, but I can't.


Here's a quick example I just did using the docs troubleshooting page:
Guide to cPanel Interface Customization - Troubleshoot Custom Styles - Software Development Kit - cPanel Documentation

1 - I logged into a specific cPanel account and open File Manager and create my new style. From the docs:
  • For a specific cPanel account — /home/username/var/cpanel/styled/mystyle/
My new style is here:
/home/username/var/cpanel/styled/infoprostyle/

2 - And then I navigated into that new directory and created an empty file called styles.css

3 - Next I open that file for editing, and add only the example provided in that doc:
Code:
body {
    background-color: blue;
}
4 - Then I went back to cPanel, used the "Change Style" option on menu, top right corner of cPanel, and on the page that opens, I now see this:

infoprostyle.png

5 - I click Apply on my new style shown there and I end up with this:


infoprostyleblue.png
 

kjg

Well-Known Member
Mar 2, 2004
158
3
168
Hi Infopro and thank you for the reply
So I guess the only way to achieve what I need is to take a full copy of retro and add some styles in that one and make it the default style. Then block possibility to change styles.
When cpanel updates retro, I'll just have to do a new copy of retro and add my new style again to that new copy.

Thank you.

I'll go ahead and do this and see if it works