Use CSS preprocessor in polymer elements

In Polymer, I can include CSS styles in the element definition by simply adding the <style> . However, I would like to add a preprocessor to these styles. Something like https://autoprefixer.imtqy.com/ would be great.

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

+5
source share
1 answer

Use the build step to extract the built-in resources for file sharing - something like gulp-html-extract .

Once you extract the source, you can process it separately.

Then you would use a tool like Vulcanize to reinsert your styles into your main component.

+2
source

Source: https://habr.com/ru/post/1233294/


All Articles