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,202 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
81 /100 Excellent
Development Activity 68
Maintenance 80
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

Rust
72%
Other

iii

Developer Tools · Devops

18,854

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 72%
TypeScript 16%
Updated 1 weeks ago
PHP
84%
Other

Invoice Ninja

Invoicing Finance · Project Management

10,311

Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.

View details
97
Repo Health
83
Technical
62
Dependency
Built with
PHP 84%
Updated 1 weeks ago
Rust
56%
Other

Jan

AI Assistants

45,052

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
65
Dependency
Built with
Rust 56%
TypeScript 40%
Updated 6 days ago
TypeScript
66%
MIT

Jitsu

Data Engineering

5,110

Open-source, fully-scriptable data ingestion engine that streams events from web, apps, and APIs to any data warehouse in real time.

View details
89
Repo Health
79
Technical
66
Dependency
Built with
TypeScript 66%
Go 32%
Updated 1 weeks ago
TypeScript
96%
AGPL 3.0

Kan

Project Management

5,825

An open-source, self-hostable Kanban board built as a modern Trello alternative with team workspaces, board permissions, and Trello import.

View details
86
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 96%
Updated 1 weeks ago
TypeScript
98%
AGPL 3.0

Karakeep

Bookmarks Archiving

29,926

Self-hosted bookmark manager that captures links, notes, images, and PDFs with AI tagging, full-text search, and automatic archiving.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,433

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
88
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 1 weeks ago
Elixir
71%
AGPL 3.0

Keila

Marketing

2,246

Self-hosted newsletter platform with a visual block editor, Liquid personalization, and flexible email delivery — a privacy-respecting Mailchimp alternative you run on your own infrastructure.

View details
87
Repo Health
76
Technical
66
Dependency
Built with
Elixir 71%
HTML 18%
Updated 1 weeks ago
TypeScript
52%

Kener

Devops · Monitoring

5,216

Stunning, self-hosted status pages with real-time uptime monitoring, incident management, and multi-channel notifications in a single Docker container.

View details
87
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 52%
Svelte 45%
Updated 1 weeks 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