Autoprefixer

Parses your CSS and automatically adds vendor prefixes using real-world browser usage data from Can I Use.

Library
npm
v10.6.1
22,225 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
87 /100 Excellent
Development Activity 84
Maintenance 88
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
89 /100 Excellent
Architecture 90
Code Quality 92
Innovation 85
Learning Curve 90

Autoprefixer is a PostCSS plugin that removes the need to hand-write vendor-prefixed CSS. It reads your project’s Browserslist configuration (a .browserslistrc file or a browserslist key in package.json), cross-references the target browser list against Can I Use’s compatibility tables via caniuse-lite, and rewrites your stylesheet to add exactly the -webkit-, -moz-, -ms-, and -o- prefixes those browsers still require — nothing more, nothing less.

It ships as a single dependency-free-feeling plugin (require('autoprefixer')) that drops into any PostCSS pipeline — Webpack’s postcss-loader, the postcss-cli, Gulp, Vite, or a plain postcss.config.js — and is recommended by Google and used in production by Twitter and Alibaba.

What You Get

  • A PostCSS plugin (autoprefixer()) that adds and removes vendor prefixes automatically based on your configured browser targets
  • Browserslist integration, so the same browser-support config drives Autoprefixer, Babel, and other tools consistently
  • Dozens of per-feature ‘hack’ modules (flexbox, grid, gradients, backdrop-filter, mask, appearance, and more) that encode each property’s specific prefixing quirks
  • A CLI binary (bin/autoprefixer) and a programmatic info() API for inspecting which prefixes would be applied for a given browser list
  • Optional limited CSS Grid Layout translation for IE 10/11 via the grid: "autoplace" option or an inline control comment

Common Use Cases

  • Dropping into a Webpack, Vite, or postcss-cli build so authored CSS never needs hand-written vendor prefixes
  • Sharing one Browserslist target list across Autoprefixer, Babel, and Stylelint for consistent cross-tool browser support
  • Auditing legacy CSS with the info() API or CLI to see exactly which prefixes are still needed for a given browser matrix
  • Enabling limited CSS Grid autoplacement support for older IE-targeting projects via the grid option

Under The Hood

Architecture — The package’s execution flow starts at lib/autoprefixer.js, which exports a factory function (module.exports = plugin) implementing the PostCSS 8 plugin contract: it returns an object with postcssPlugin: 'autoprefixer' and a prepare(result) hook that resolves a Prefixes instance (from lib/prefixes.js) built against the current Browsers selection (lib/browsers.js, itself wrapping browserslist and caniuse-lite’s unpacked agent data). On OnceExit, it calls prefixes.processor.remove(root, result) then prefixes.processor.add(root, result) (lib/processor.js) to rewrite the PostCSS AST in place. lib/prefixes.js is the orchestration hub — it imports roughly 50 dedicated ‘hack’ modules from lib/hacks/ (e.g. display-flex.js, grid-template.js, backdrop-filter.js, mask-composite.js), each encoding the specific rewrite logic for one CSS feature’s historical vendor-prefixed syntax. Supporting modules (declaration.js, at-rule.js, selector.js, value.js, supports.js, resolution.js, transition.js, vendor.js, brackets.js) handle AST-node-level transforms, and lib/info.js powers the introspection API.

Tech Stack — Runtime dependencies are deliberately narrow: browserslist (target resolution), caniuse-lite (compatibility data, kept current via periodic data/prefixes.js regeneration), fraction.js (precise resolution/media-query math), picocolors (CLI warning output), and postcss-value-parser, with postcss itself as a peer dependency pinned to ^8.1.0. The project builds with pnpm workspaces, lints with oxlint (an oxc-based fast linter, configured via oxlint.config.ts), formats with oxfmt, and targets Node ^10 || ^12 || >=14 for broad compatibility given its position deep in the front-end tooling supply chain.

Code Quality — Testing uses uvu as the runner across 15+ *.test.js files (one per core module: prefixer, prefixes, browsers, declaration, selector, value, supports, at-rule, old-selector, old-value, brackets, utils, info, postcss) plus an extensive test/cases/ directory of paired input/expected-output CSS fixtures covering dozens of individual browser-prefixing scenarios. Coverage is enforced strictly via c8 with check-coverage: true and a lines: 100 threshold — a notably high bar for a library of this size and age. test:lint runs oxlint across the codebase and bin/, and test:size runs size-limit to guard the published bundle against regressions.

API Design — The public surface is a single default export used as require('autoprefixer') or autoprefixer() inside a postcss.config.js plugins array, requiring zero configuration in the common case since it reads Browserslist config automatically from the project. Options (overrideBrowserslist, env, stats, grid, remove, add) are typed via a hand-maintained lib/autoprefixer.d.ts, and the plugin proactively throws clear, actionable errors when deprecated options (browser, browserslist) are used, guiding users to the current overrideBrowserslist name. This makes integration close to one line for the default case while still exposing fine-grained control for advanced setups.

Used by 198 apps in this directory

Go
73%
GPL 3.0

1Panel

Devops · Hosting Control Panel · Monitoring

37,044

The only open-source VPS control panel with native AI agent runtime — deploy websites, Docker stacks, and local LLMs from one web interface.

View details
91
Repo Health
76
Technical
67
Dependency
Built with
Go 73%
Vue 27%
Updated 4 days ago
TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

166

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
31
Repo Health
70
Technical
64
Dependency
Built with
TypeScript 76%
MDX 18%
Updated 1 years ago
TypeScript
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 5 days ago
TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 5 days ago
Python
47%
Other

Airbyte

Data Engineering · Developer Tools

22,143

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python 47%
Kotlin 43%
Updated 4 days ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
PHP
82%
Other

Akaunting

Invoicing Finance

10,149

Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.

View details
98
Repo Health
73
Technical
63
Dependency
Built with
PHP 82%
Blade 13%
Updated 5 days ago
JavaScript
94%
MIT

Another Redis Desktop Manager

Databases · Developer Tools

34,787

Fast, stable Redis GUI with cluster, SSH, and massive key support

View details
81
Repo Health
56
Technical
67
Dependency
Built with
JavaScript 94%
Updated 1 months ago
JavaScript
95%
MIT

AnythingLLM

AI Assistants · Automation · Developer Tools

66,533

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
90
Repo Health
78
Technical
64
Dependency
Built with
JavaScript 95%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers