Saying bye-bye to autoprefixer

Direct Link

For a while now I’ve been using gulp-autoprefixer as part of my front-end build system. It’s a means of writing standard CSS then having the system automatically parse the rules and generate any necessary vendor-prefixed versions (such as ::-webkit-input-placeholder).

I’ve often felt that the glut of extra rules it creates is excessive – like using a hammer to crack a nut. Furthermore I’ve wondered if it might be doing more harm than good, by leading me to believe I have a magical sticking plaster for non-supporting browsers when actually – especially in the case of IE – the specific way in which a browser lacks support might be more nuanced. And from a practical perspective the noise generated by all those extra rules makes using the inspector to debug what would otherwise be just a few lines of CSS that much harder.

But I always felt it was a necessary evil.

However, I’ve just removed gulp-autoprefixer from my boilerplate.

Why? Because:

  1. In 2019, browsers are no longer shipping any new CSS with prefixes, and in fact they haven’t been for years;
  2. With the browsers that do require prefixed CSS now old and in the minority, it feels like progressive enhancement rather than “kitchen sink” autoprefixing should take care of them. (Those browsers might not get the enhanced experience but what they’ll get will be fine.)

Jen Simmons’ tweet was the push I needed. It’s just taken ‘til now to take the plunge!

So I’ve removed one layer of complexity from my set-up, and so far nothing has exploded. Let’s see how it goes.

External Link Search