Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Smarter CSS Prefixes with grunt-autoprefixer

Noah Collins
December 11, 2013

Smarter CSS Prefixes with grunt-autoprefixer

Managing CSS vendor prefixes can require a lot of maintenance. There are many good tools that help automate this process, but they require either static prefixes in your source files or mixins.

Autoprefixer takes this concept one step further by allowing you to keep prefixes out of your source CSS (or LESS/SASS/Stylus) entirely. It references your supplied configuration, compares that against the Can I Use API, and outputs only the prefixes you need. The result: clean style files that are always current and trivially easy to maintain.

From a talk given at the December 2013 Seattle JS meetup.

Noah Collins

December 11, 2013
Tweet

Other Decks in Programming

Transcript

  1. Flexbox Support IE Firefox Chrome Safari Opera iOS Safari Android

    BB 2.1 -wk 3.2 -wk 2.2 -wk 7 21 -wk 4.0 -wk 2.3 -wk 8 28 -wk 4.2 -wk 3.0 -wk 9 23 29 5.1 -wk 5.0 -wk 4.0 -wk 10 -ms 24 30 6.0 -wk 12.1 6.0 -wk 4.1 -wk 7 -wk 11 25 31 7.0 -wk 17.0 7.0 -wk 4.2-4.3 10 -wk
  2. Flexbox Results .item { display: flex; } .item { display:

    -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; }
  3. Border Radius Support IE Firefox Chrome Safari Opera iOS Safari

    Android BB 2.1 -wk 3.2 -wk 2.2 7 21 4.0 2.3 8 28 4.2 3.0 9 23 29 5.1 5.0 4.0 10 24 30 6.0 12.1 6.0 4.1 7 11 25 31 7.0 17.0 7.0 4.2-4.3 10