Shopify themes, liquid, logos, and UX
Hey there,
I was editing some code in theme.scss.liquid and ended up changing my mind and deleting the bit I changed. But for some reason my website is no longer working, and when I try to edit I am given the message "Invalid CSS after "x-width:": expected pseudoclass or pseudoelement, was "767px){" at 5810" can someone please help.
Thanks!
Here's the area I believe has the error:
x-width:767px){
.has-secondary.grid-view-item__link img.secondary{
display:none;
}
}
.grid-view-item__title {
margin-top: 10px;
}
Solved! Go to the solution
This is an accepted solution.
Unfortunately shopify is in a bad habit of not providing original files of old theme versions.
Duplicate your current broken theme and try the file transplant anyway on the duplicate and if that's not problematic consider trying the transplant on the live theme.
Beyond that a super iffy fallback is to dig through the CDN trying to decrement to older version parameter values.
I tried going back some but did not see any references to the relevant rules like .has-secondary .
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
This is PageFly - Free Landing Page Builder.
That error because of wrong syntax on the css property. The proper syntax should be like
@media screen (max-width:767px){
.has-secondary.grid-view-item__link img.secondary{
display:none;
}
}
You can copy my code or you can delete it to make it work
Hope this can help you solve the issue
Best regards,
PageFly
Hi! Thanks for the reply. Unfortunately, it's still not working. Any other thoughts?
I can't believe I did this right before my new collection launch. Oof!
Can you take the screenshot in file, or where the message show for me?
The error message stopped showing up but the problem is still there. If I give you the website name would that help or more of the CSS?
please help me with the website url and take screenshots on the file you have edited, i will have an better overview on the issue.
for some reason the error message isnt coming up anymore but the website still is not working.
Hi @Caitlin333,
You can try to remove this code, click Save button and then check again
x-width:767px){
.has-secondary.grid-view-item__link img.secondary{
display:none;
}
}
- Helpful? Like and Accept solution! Support me: Buy coffee
- Ryviu - Reviews & QA app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
I accidentally deleted the entire code. I'm really not doing my best tonight! Is there a way to get the entire theme.scss.liquid back? I really appreciate your help.
Do you have any backup files? The scss file type cannot revert it back.
You can re-install the theme once again and copy the scss file
or you can contact the theme, they can provide a new file for you
Hi @Caitlin333 assets like theme.scss don't have a version history in the editor.
The easiest solution is if you made no other changes to this file and this is recent new theme install simply go to the theme store and install a new copy of the theme and copy the contents of the file in the new theme to your old theme, and then start trying you coding changes over again.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Hey there - thanks so much. I made no other changes. I tried what you suggested but it turns out I am using Debut 2.1.0 which is an older version than the one available to install. Man oh man...any other thoughts?
This is an accepted solution.
Unfortunately shopify is in a bad habit of not providing original files of old theme versions.
Duplicate your current broken theme and try the file transplant anyway on the duplicate and if that's not problematic consider trying the transplant on the live theme.
Beyond that a super iffy fallback is to dig through the CDN trying to decrement to older version parameter values.
I tried going back some but did not see any references to the relevant rules like .has-secondary .
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024