• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Craig Simpson

  • Home
  • About
  • Plugins

14th November 2016 — 0

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.

Workflow

Reader Interactions

Leave a Reply Cancel reply

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

Footer

Get more by email

Subscribe to my email newsletter for a monthly digest of my blog posts, as well as exclusive developer content and curated links to useful resources.

Copyright © 2015–2022 Craig Simpson • Built on the Genesis Framework

Twitter GitHub