Can i use liquid in css?

New Member
2 0 0

Hi I just wanted to know if I can use liquid in css . Example :
Screenshot 2019-01-29 at 10.51.58 AM.pngproduct-template.liquid

 

Screenshot 2019-01-29 at 10.51.50 AM.pngcustom.scss.liquid

Instead hardcode it in my custom.scss.liquid file. I want to use :
.usp_{{ shop.name }} {
background-color: ...

 

Is this possible?

0 Likes

Hello,

 

Hope following links will help you.

 

https://github.com/Shopify/slate/wiki/Styles-with-Liquid

https://www.shopify.in/partners/blog/topics/learning-liquid

 


Thanks & Regards

MS Web Designer Team
Official Shopify Expert and Partner
https://experts.shopify.com/ms-webservices

 

MS Web Designer (Official Shopify Expert and Partner) - https://experts.shopify.com/ms-webservices
0 Likes
Highlighted
Shopify Expert
9420 11 1262

Liquid CSS files do support Liquid (makes sense when you say it out loud) but you won't get the full suite of objects and functions.

This is a 5 second test, but can say that the shop object isn't available so you won't be able to pull that name property.

 

If it's super important to have the css pull the name you'll need to inline the CSS into a template file instead.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes