Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use a CSS preprocessor with Polymer?

With Polymer I can include my CSS styles in the element definition simply by adding a <style> tag. What I would like to do though is to add a preprocessor to those styles. Something like https://autoprefixer.github.io/ would be great.

Is there a way to do so without an external CSS file?

like image 993
Giorgio Polvara - Gpx Avatar asked Oct 31 '22 17:10

Giorgio Polvara - Gpx


1 Answers

Use a build step to extract inline resources to separate files - something like gulp-html-extract.

Once you have the source extracted, you can process it separately.

You would then use a tool like Vulcanize to re-inline your styles back into your main component.

like image 136
Chad Killingsworth Avatar answered Nov 13 '22 01:11

Chad Killingsworth