Pixel2HTML / shopify-skeleton

PSA: this repo has been moved into Pixel2HTML/Pixel2HTML -->
https://github.com/Pixel2HTML/Pixel2HTML/tree/master/packages/generator-shopify
MIT License
26 stars 5 forks source link

Liquid Tags in Sass #3

Closed pjatx closed 6 years ago

pjatx commented 6 years ago

Hey There,

First of all, thanks for making this. It seriously rocks. So glad to be free of all of the Slate limitations.

What's the best way to handle liquid tags in the SCSS files? Trying to reference a background image in my sass and can't get it to work.

shelldandy commented 6 years ago

@pjatx the way we handle those things is with a quick inline style directly in the liquid. The reason for that is that postcss freaks out hard with {{}} liquid syntax and sometimes also uglify so we decided to keep JS and SCSS out of liquid for the time being.

I've seen before how to circumvent this https://gist.github.com/tmslnz/1d025baaa7557a2d994032aa88fb61b3#file-gulpfile-js-L84-L88

But I've had issues in the past with it so most of the time I'd just go with the inline liquid style 😛

pjatx commented 6 years ago

Ah, nice and simple. Thanks!

shelldandy commented 6 years ago

no problem 😄