Resolved

CSS edits are not being honored

Polestar Theme started by Holden Hays Mar 28, 2019 3 replies
Holden Hays Mar 28, 2019 · 5:22 pm #12389

Hello, I have tried in several different ways to get CSS edits in the theme editor to work but they don’t. I can change the CSS in the Customize > Additional CSS just fine but if I try to take that same CSS and put it into the style.css file it’s like it completely ignores it.

for example on my site pemodea.com there is a simple h1 heading. If I wanted to hide it I can add h1{display:none;} and it will not disappear if I add that CSS to the styles.css file.

Not sure what to do at this point.

Andrew Misplon Puro Mar 28, 2019 · 5:31 pm #12390

Hi Holden

Thanks for posting.

CSS is impacted by the order it’s loaded in and specificity. Additional CSS and the child style.css file aren’t loaded in the same place so the order is impacted. If I change your only child style.css rule as follows:

h1 {
	display: none;
	font-family: 'Roboto', sans-serif;
}

The h1 on the home page is removed. Put another way, I’d need to try to assist with a specific example. There, unfortunately, isn’t a general fix here other than diving a bit deeper into CSS (https://css-tricks.com/specifics-on-css-specificity/). Which heading tag are you trying to hide? The h1 on the home will be removed if you change the rule as I’ve indicated above.

Holden Hays Mar 29, 2019 · 9:16 pm #12400

Thank you, I found out that my server was caching the CSS so I was not seeing the edits! Thank you for your help!

Andrew Misplon Puro Mar 29, 2019 · 10:39 pm #12401

Super 🙂 Really glad to hear you were able to resolve this. Sorry for not suggesting caching, I thought we were looking at more of a challenge with applying rules rather than rules not being there. If you have any questions in the future, please let me know.

All the best.

4 posts