[PostCSS] is a powerful tool for transforming stylesheets. If it’s unfamiliar to you, PostCSS turns stylesheets into readable objects in JavaScript called ASTs (Abstract Syntax Trees) and then turns those ASTs back into stylesheets, completing the circle.
Nothing changes. What’s the fun in that? The greatness of PostCSS is found in PostCSS plugins.
PostCSS plugins read and modify the AST before it’s turned back into a stylesheet. There are plugins to automatically add [vendor prefixes] to properties and selectors, or interpret Sass-like [variables], [mixins], and [loops], or down-mix [future] and [experimental] features to CSS. PostCSS plugins can even generate entirely new documents based on the CSS, like [styleguides].
Writing a PostCSS plugin is remarkably simple, thanks to its solid API. Still, one of the first challenges aspiring plugin authors face is importing other files. In other words, replacing links in a stylesheet with the contents of those links. This is where something like `@import