Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.6 KB

README.md

File metadata and controls

24 lines (14 loc) · 1.6 KB

Use postcss

Postcss is a tool for transforming styles with javascript plugins. These plugins can lint your css, support variables and mixins, transpile future css syntax, inline images, and more.

Configuration

Explain this example

Because browserlist is set to ie 10, custom properties are transpiled to their original value and prefixes are added for flexbox.

Notes

Postcss plugins order is important, they are evaluated from left to right.

If you target older browser (like IE) set preserve to false.

When preserve: false it only transpile css custom properties that are defined within their file. Therefor if you import them from a different file @import "./partials/var.css"; you must parse the import statement with postcss-import. If you want to run a test try to to comment out postcssImport() and run the build, only --color-1 will be transpiled.

If you are using sass you don't need postcss-import (import statements are handled by sass).