PostCSS plugin for using Liquid variables in CSS files.
npm install postcss-liquid-variablesPostCSS plugin to allow use of Liquid theme variables in CSS files.
Forked from PostCSS Shopify Settings Variables and adjusted slightly for use with non-Shopify Liquid templates.
``css`
.foo {
background-color: $(theme_preferences.background_colour);
}
Will be transformed to:
`css`
.foo {
background-color: {{ theme_preferences.background_colour }};
}
`js``
postcss([ require('postcss-liquid-variables') ])
See PostCSS docs for examples for your environment.