Join Ray Villalobos for an in-depth discussion in this video What is PostCSS?, part of PostCSS: First Look.
That allows it to take care of different transformations and it can also work with different build tools like GulpJS, GruntJS, Broccoli, and others to handle the transformation process. Because it uses NodeJS and a modular architecture, it is three to 30 times faster than other tools. Sass in contrast, needs Ruby installed and when you add some extensions the get added as gems which makes the applications run a little bit slower. Now because it is modular, it's a lot more efficient.
The engine itself is very tiny and that's one of the first differences you'll notice between something like PostCSS and something like Sass or LESS. Instead of installing a huge amount of features or Ruby gems the core is super small and that makes it more efficient. Another big difference between PostCSS and other tools is that it's not just a pre-processor but it can also behaveas a post-processor. So it can convert future CSS syntax to CSS, but also do things like add prefixes to a finished style sheet.
The plugins for PostCSS can also do things to any file, not just a CSS document and can also perform any number of other transformations. Although PostCSS is pretty new, it can already handle an amazing number of tasks including letting you support future CSS features in older browsers like variables and mixins. Or it can work like Sass, giving you features like nesting and variables. Now because of the modular nature of PostCSS, you can use it with your existing tools.
So if you're not ready to make the transition to doing everything with PostCSS, you can use it to do just what you need. If Autoprefixing your CSS is all you need, then PostCSS can take care of only that part of your process. Now because PostCSS is modular, fast, and flexible it's quickly becoming a serious contender to take care of common tasks. So learning how to use it should definitely be on your list of things to do. In the next video, I'll show you what you need to get started.
In this short course, you'll learn how to set up a workflow for Gulp.jsusing PostCSS, which can speed up the way you build websites and change the way you write CSS. Author Ray Villalobos will also introduce the most useful PostCSS plugins, including cssnano, Autoprefixer, cssnext, and PreCSS.