explaingit

postcss/autoprefixer

Analysis updated 2026-06-21

22,252JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

Autoprefixer is a CSS build tool plugin that automatically adds the browser-specific prefixes your CSS needs based on real usage data, so you can write clean modern CSS without manually tracking cross-browser compatibility.

Mindmap

mindmap
  root((autoprefixer))
    What it does
      Auto CSS prefixing
      Cross-browser compat
      PostCSS plugin
    How it works
      Reads your CSS
      Checks Can I Use data
      Adds needed prefixes
    Configuration
      Browserslist file
      Package.json key
      Grid translation mode
    Build integrations
      Webpack Gulp CLI
      CSS in JS editors
    Audience
      Web developers
      Frontend engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Write modern CSS once and let Autoprefixer add vendor prefixes for your target browsers automatically at build time

USE CASE 2

Add Autoprefixer to a Webpack or Gulp pipeline to keep cross-browser CSS support accurate and up to date

USE CASE 3

Use a .browserslistrc file to control exactly which browsers get prefix support across your project

USE CASE 4

Enable Autoprefixer grid translation mode to convert modern CSS Grid syntax into IE 10 and 11 compatible syntax

What is it built with?

JavaScriptPostCSSNode.js

How does it compare?

postcss/autoprefixerlocaltunnel/localtunnelbe5invis/iosevka
Stars22,25222,26322,206
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires PostCSS in your build pipeline, configure target browsers via a .browserslistrc file or a browserslist key in package.json.

In plain English

Autoprefixer is a tool for web developers that automatically rewrites CSS files to add the vendor prefixes browsers need, so you don't have to remember or maintain them yourself. CSS rules sometimes work only when written with a special prefix like -webkit- or -moz- for certain browsers, which prefixes are actually required changes over time as browsers update. Autoprefixer reads your CSS, looks up real-world support data from the Can I Use website, and inserts only the prefixes still needed for the browsers you want to target. Technically, Autoprefixer is a plugin for PostCSS, a JavaScript tool that parses CSS into a structured form, lets plugins transform it, and writes it back out. You hand it source like ::placeholder { color: gray, } and it produces the expanded form with ::-moz-placeholder added alongside. Which browsers count as "supported" is controlled through Browserslist, typically a .browserslistrc file or a browserslist key in package.json, with queries such as "> 5%", and the README recommends using that shared config rather than passing options directly. Autoprefixer does not polyfill behaviour, it only adds prefixes. It also includes an opt-in mode that can translate modern CSS Grid syntax into the older IE 10/11 grid syntax, with documented limitations and control comments to enable or disable transformations per file. You would use Autoprefixer when you want to write clean, modern CSS once and let the build pipeline keep cross-browser support correct. It plugs into common build tools and workflows including Gulp, Webpack, CSS-in-JS, a CLI, other preprocessors, GUI tools, plain JavaScript, and various text editors and IDEs.

Copy-paste prompts

Prompt 1
How do I add Autoprefixer to my Webpack config so my CSS is automatically prefixed for browsers with more than 1% global usage?
Prompt 2
I am using Gulp. Show me how to add Autoprefixer to my Gulp CSS build task with a .browserslistrc targeting the last 2 versions of Chrome, Firefox, and Safari.
Prompt 3
What is a Browserslist query and how do I write one that targets modern browsers while still supporting Safari 12? Show me where to put it in my project.
Prompt 4
My project uses CSS Grid and I need IE 11 support. How do I enable Autoprefixer grid translation mode, and what are the limitations I should know about?
Prompt 5
I write vanilla CSS with no build tool. What is the simplest way to run Autoprefixer on a CSS file from the command line?

Frequently asked questions

What is autoprefixer?

Autoprefixer is a CSS build tool plugin that automatically adds the browser-specific prefixes your CSS needs based on real usage data, so you can write clean modern CSS without manually tracking cross-browser compatibility.

What language is autoprefixer written in?

Mainly JavaScript. The stack also includes JavaScript, PostCSS, Node.js.

How hard is autoprefixer to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is autoprefixer for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub postcss on gitmyhub

Verify against the repo before relying on details.