Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Why isn't my CSS file minifying on Shopify?

Why isn't my CSS file minifying on Shopify?

khairali
Visitor
1 0 0

I am trying to  minifying shopify css files , all most in all blogs/forums they  provide one solution by renaming the file xxx.css to xxx.scss.liquid. I followed their steps but still don't get any result . 

below is my snippet , 

First  step rename file  to.  featured-magazine.scss.css;

khairali_1-1618748994612.png

 

2nd step is  import

 

khairali_0-1618748943504.png

 but still my css file is not  minifying 

khairali_2-1618749497864.png

khairali_3-1618749535019.png

what thing i am missing ? or is there any limitation in shopify?

 

Replies 2 (2)

LuckyNigam
Pathfinder
142 8 14

Hi @khairali 

First you minify the css by online tool and copy the css. create a new file for minifid css and paste the minified css here  then rename the file name in theme.liquid file. 

Thanks

 

marie_h
Tourist
6 1 4

Yep, since Shopify depreciated SCSS, this solution does not work anymore.

You can try solution from this thread:

https://community.shopify.com/c/Technical-Q-A/Tool-to-minify-css-liquid/m-p/1122310 

also, looks like Shopify will support minification out of the box, as per

https://community.shopify.com/c/Online-Store-Speed/Shopify-offers-Javascript-minification/m-p/110367...