# Autoprefixer

> Autoprefixer lets you write your CSS rules without vendor prefixes.

- URL: https://evilmartians.com/opensource/autoprefixer
- GitHub: https://github.com/postcss/autoprefixer
- Authors: Andrey Sitnik

---

Autoprefixer allows you to write your CSS rules without vendor prefixes (in fact, you can forget about them entirely). This PostCSS plugin for parsing CSS and adding vendor prefixes as needed is one of the most popular frontend build libraries. It's been recommended by Google and is used by Twitter and Alibaba.

Autoprefixer is a [PostCSS] plugin used to parse CSS and add vendor prefixes to your rules by using the values from [Can I Use].

Thus, you can write your CSS rules without vendor prefixes:

```css
::placeholder {
  color: gray;
}

.image {
  background-image: url(image@1x.png);
}
@media (min-resolution: 2dppx) {
  .image {
    background-image: url(image@2x.png);
  }
}
```

Autoprefixer will use data based on current browser popularity and property support to automatically apply prefixes for you:

```css
::-moz-placeholder {
  color: gray;
}
::placeholder {
  color: gray;
}

.image {
  background-image: url(image@1x.png);
}
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 2dppx) {
  .image {
    background-image: url(image@2x.png);
  }
}
```

You can also try out an [interactive demo of Autoprefixer].

[interactive demo of Autoprefixer]: https://autoprefixer.github.io/
[Can I Use]:        https://caniuse.com/
[PostCSS]:          https://evilmartians.com/products/postcss
