Same here. Brand new site, nothing fancy, just trying to add some css and you get this stupid error.
If you added any custom CSS on a section remove it and move it to the theme.liquid file and add it between the style tags, make sure the css contains the sections id so that the style does not cascade down through the entire theme
Interestingly.. I found out that my theme also has a separate css file that you can use to put stuff in that will be used site-wide. This solved my problems.
Hi ,
I am still facing while updating my CSS file though its just 1 line of code but not able to publish is.
Theme: Dawn 12.0.0
code:
#cart-icon-bubble {
visibility: hidden;
}
Also having this issue with Prestige 5.
Looks like the shopify team have scrambled as the problem doesn’t seem to have resolved yet ![]()
Yep, still happening today. For me it’s related to the below style in one of my custom css rules
content:"";
Here’s the full css:
.opt-btn.is-unavailable + .opt-label {
position: relative;
}
.opt-btn.is-unavailable + .opt-label::before {
content: "";
top: 50%;
left: 50%;
width: 100%;
height: 1px;
background-color: rgba(72, 73, 75, 0.2);
transform: translate(-50%, -50%) rotate(-35deg);
transform-origin: center;
position: absolute;
}
Obviously I need the content style in order for this specific use-case to work. This would use css to add a diagonal line through a option that is unavailable. I’m not sure why Shopify would restrict this.
As a temporary workaround for myself, I changed pointer-events to none. Not an ideal solution, but it’ll work for now.
.opt-btn.is-unavailable + .opt-label {
position: relative;
pointer-events: none;
}
WebrealtyNYC, have you tried using an external css file and put that particular part of code in there?
Have you tried (never seen before, but worth trying) using single quotes instead of double?
What resolved the issue for me is removing a commented code line in my custom css.
This happened to me too. When I add ‘visibility: hidden;’ to one of my custom CSS. I replaced it with display: none; It worked for me.
I got the same error message, and based on some of the answers provided here I was able to narrow it down to the use of the !important property in my custom CSS. Once I removed that, I was able to save successfully.
it works by removing the commented code