talira

Autoprefixer

Adds CSS vendor prefixes using Can I Use data

open sourceMITfree

Autoprefixer is a PostCSS plugin that adds vendor prefixes to your CSS rules for you, using browser support data from Can I Use and the browsers you choose to support, so you write standard CSS and never type a prefix. It also removes prefixes that are no longer needed. It runs wherever PostCSS does: in build tools and bundlers, from the command line or through its JavaScript API.

Problems it solves

  • stop writing -webkit- and -moz- prefixes in my CSS by hand
  • add vendor prefixes only for the browsers we support
  • remove outdated CSS prefixes from an old stylesheet

Features

  • adds vendor prefixes from Can I Use data
  • targets the browsers you list (Browserslist)
  • removes outdated prefixes
  • runs as a PostCSS plugin in any build tool

Alternatives

The same job

These do what Autoprefixer does.

  1. PostCSS A tool for transforming CSS with JavaScript
  2. Lightning CSS An extremely fast CSS parser, transformer, bundler, and minifier
  3. gulp-autoprefixer Gulp plugin that adds vendor prefixes to CSS with Autoprefixer
  4. PostCSS Preset Env Use modern CSS today: a PostCSS plugin pack that adds only the fallbacks your browsers need
  5. postcss-import PostCSS plugin that inlines @import rules

Compare Autoprefixer with the top 3