Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

How to clear previous custom.css after changing

Solved by Joanne Masterson View solution

Started by Joanne Masterson 7 years ago · 3 replies · 1096 views
7 years ago

Hello - new to Grav

I am using the Quark theme that came with my install.

Looking to change some styles, I updated the custom.css according to this help page:
https://learn.getgrav.org/themes/customization

I found custom.css in user/themes/quark/css/custom.css

I added a rule to make paragraph text purple, just to test:

CSS
p { 
    color: purple;
}

This worked as desired. Then I tried to restore the original color by removing the rule and overwriting custom.css with an empty custom.css.

But p text remains purple.

I have cleared the cache using the buttons on the Grav admin dashboard.

I have re-uploaded custom.css with a different hex color, but it remains purple.

Can someone help me get the CSS to update on the front end? I viewed the copy on the server and it shows my updates.

I have not found this addressed in the forum, though I will keep looking.

Advice appreciated!

7 years ago

hi @jmaster

Did you try to clear browser cache ?

7 years ago Solution

Yes I did try clearing the browser cache.

I solved it by deleting custom.css entirely and using Custom CSS plugin instead.

That is working well.

7 years ago

Oh wow, I never saw that plugin.

As a way forward, I highly recommend working from a "child"/derived theme rather than editing your copy of Quark. This protects you from losing your work when you upgrade the theme. Read about theme inheritance in the docs.

Also there are quite a few cache settings in Grav which work in addition to the ones in your browser and on your web server. These are mainly described in the system configuration section. I disable cache on everything but production (live site) servers.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 192 2 months ago
Themes & Styling · by Ian, 2 months ago
3 89 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 447 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 42 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 122 3 months ago