How to render a liquid css/stylesheet file ? #452
Replies: 4 comments
-
Not sure what this filter exactly does. But it's easy to implement and register such a filter to render that css file and wrap the result with a `<style>` tag.
I guess the tricky part will be the tags and filters inside the .css.liquid file.
Back to the question, the best way is to implement a filter or a set of required filters and tags in a plug-in and register to LiquidJS.
|
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
For Shopify, they automatically process .css.liquid files into .css files whenever your theme is saved (not on the fly like other files). |
Beta Was this translation helpful? Give feedback.
-
I suppose the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm wondering how to render a
styles.css.liquid
file with LiquidJS from several smaller files (header.css.liquid
,footer.css.liquid
...) ?The
stylesheet_tag
is not supported in LiquidJS, therefore it is not possible to write this in a layout fil in order for the css file to be parsed:What are the best practices to manage the CSS with LiquidJS in a file (and not in a huge
<style>
tag included in each page).Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions