Essential PostCSS Packages

I use Gulp as a build tool to automate a lot of the mundane tasks involved with creating WordPress themes and there are many Gulp packages to take care of everything from generating translation files, to compiling SCSS into CSS.

PostCSS packages are JavaScript based, and can be utilised by any build tool (Gulp, Grunt, Webpack). At the moment I use four PostCSS packages within my Gulp build tasks, and those are:

  • cssmqpacker: combines matching media queries into single sections.
  • autoprefixer: adds browser prefixes for your CSS rules, based on the range of supported browsers you feed in.
  • pxtorem: converts static pixel values into flexible rem values.
  • cssnano: compresses and minifies your generated CSS into the smallest production-ready file possible.

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *