# Feature catalog — tailwindlabs/tailwindcss

> Canonical page: https://codevetter.com/unpack/tailwindcss/feature-catalog

# Feature catalog — tailwindlabs/tailwindcss

Scanned commit 41d9cae8e53378d16087fcf359eb785c2fd42ce4 (2026-09-08). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

User-facing surface is (a) the CSS authoring language — a set of at-rules parsed in `parseCss`, (b) the `tailwindcss` CLI with `build` and `canonicalize` subcommands, (c) five build-tool integrations, (d) a zero-build browser CDN script, and (e) the `@tailwindcss/upgrade` migration CLI. The compat layer additionally re-exposes the entire v3 JS plugin API (`addUtilities`, `matchVariant`, `theme()`, etc.) so existing plugins keep working. IntelliSense-facing APIs (`getClassList`, `getVariants`, `canonicalizeCandidates`) are first-class exports of the design system rather than an afterthought.
- The CSS at-rule vocabulary handled in `parseCss` is `@tailwind utilities`, `@utility`, `@source` (with `not`, `inline(…)`, and brace-expansion via `expand()`), `@variant`, `@custom-variant`, `@theme` (with `reference`/`inline`/`default`/`static`/`prefix(…)` options), `@apply`, `@import`, `@plugin`, and `@config`. — [packages/tailwindcss/src/index.ts#L336-L560](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/index.ts#L336-L560) [packages/tailwindcss/src/compat/apply-compat-hooks.ts#L54-L90](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/compat/apply-compat-hooks.ts#L54-L90)
- `@import "tailwindcss" theme(reference)`, `prefix(ident)`, `important`, and `source(…)` are implemented by rewriting the `@media` node that `postcss-import`-style resolution produces — `@media theme(reference)` is transformed into a `context({ reference: true })` wrapper rather than being a distinct parser path. — [packages/tailwindcss/src/index.ts#L455-L540](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/index.ts#L455-L540)
- The `tailwindcss` CLI exposes `build` (default when no subcommand is given) and `canonicalize`, with root-level `--help` dispatch in `run()` that also errors on unknown non-flag commands. — [packages/@tailwindcss-cli/src/index.ts](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-cli/src/index.ts)
- `tailwindcss build` supports `--input/-i` (including `-` for stdin), `--output/-o`, `--watch[=always]`, `--poll[=ms]`, `--minify/-m`, `--optimize`, `--cwd`, `--map`, and `--silent`; when no `--input` is given it defaults to compiling `@import 'tailwindcss';`. — [packages/@tailwindcss-cli/src/commands/build/index.ts#L29-L78](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-cli/src/commands/build/index.ts#L29-L78) [packages/@tailwindcss-cli/src/commands/build/index.ts#L178-L188](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-cli/src/commands/build/index.ts#L178-L188)
- `tailwindcss canonicalize` rewrites candidate lists to their canonical form, reading from argv or stdin, with `--css` to point at a design-system entry, `--format text|json|jsonl`, and `--stream` for line-by-line stdin processing — aimed at tooling like Prettier plugins and linters. — [packages/@tailwindcss-cli/src/commands/canonicalize/index.ts#L36-L120](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-cli/src/commands/canonicalize/index.ts#L36-L120) [packages/tailwindcss/src/canonicalize-candidates.ts](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/canonicalize-candidates.ts)
- `@tailwindcss/vite` ships as an array of three Vite plugins — `@tailwindcss/vite:scan` (config capture), `:generate:serve` (dev), and `:generate:build` (production, which additionally runs `optimize()`) — each with `transform.filter` id include/exclude regexes that skip `?raw`, `?url`, `?worker`, and CommonJS proxy requests. — [packages/@tailwindcss-vite/src/index.ts#L166-L285](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-vite/src/index.ts#L166-L285)
- `@tailwindcss/postcss` accepts `base`, `optimize` (defaults to `NODE_ENV === 'production'`), and `transformAssetUrls`, and bundles a `fixRelativePathsPlugin()` that repairs paths when `postcss-import` ran before it. — [packages/@tailwindcss-postcss/src/index.ts#L52-L84](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-postcss/src/index.ts#L52-L84) [packages/@tailwindcss-postcss/src/postcss-fix-relative-paths](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-postcss/src/postcss-fix-relative-paths)
- `@tailwindcss/webpack` and `@tailwindcss/turbopack` are near-identical webpack `LoaderContext` loaders taking `{ base, optimize }`, both keyed into a shared `QuickLRU` cache of max size 50 via `getCacheKey(resourceId, opts)`. — [packages/@tailwindcss-webpack/src/index.ts#L18-L80](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-webpack/src/index.ts#L18-L80) [packages/@tailwindcss-turbopack/src/index.ts#L18-L60](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-turbopack/src/index.ts#L18-L60)
- `@tailwindcss/browser` is a CDN build that reads `<style type="text/tailwindcss">` blocks, auto-injects `@import "tailwindcss";` when the user's CSS has no `@import`, and serves `tailwindcss`, `/preflight`, `/theme`, and `/utilities` from inlined `assets.css.*` strings; plugins and config files throw. — [packages/@tailwindcss-browser/src/index.ts](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-browser/src/index.ts)
- The v3 JS plugin API is fully re-implemented in `compat/plugin-api.ts`: `addBase`, `addVariant`, `matchVariant`, `addUtilities`, `matchUtilities`, `addComponents`/`matchComponents` (which just delegate to the utility variants), and a `theme()` function built by `createThemeFn`. — [packages/tailwindcss/src/compat/plugin-api.ts#L39-L80](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/compat/plugin-api.ts#L39-L80) [packages/tailwindcss/src/compat/plugin-api.ts#L266-L560](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/compat/plugin-api.ts#L266-L560)
- `tailwindcss` re-exports v3 compatibility entry points as separate package exports: `tailwindcss/colors`, `tailwindcss/defaultTheme`, `tailwindcss/plugin`, and `tailwindcss/lib/util/flattenColorPalette`, each with paired `.ts`/`.cts` implementations for ESM and CJS. — [packages/tailwindcss/package.json#L18-L70](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/package.json#L18-L70) [packages/tailwindcss/src/compat/colors.cts](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/compat/colors.cts) [packages/tailwindcss/src/compat/default-theme.ts](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/compat/default-theme.ts)
- `@tailwindcss/upgrade` is a standalone migration CLI (`--config`, `--force`, `--version`) that refuses to run on a dirty git tree, migrates stylesheets, migrates `tailwind.config.js` into CSS, rewrites class names in templates, and then shells out to the detected package manager to bump `tailwindcss` and friends to `@latest`. — [packages/@tailwindcss-upgrade/src/index.ts#L28-L100](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-upgrade/src/index.ts#L28-L100) [packages/@tailwindcss-upgrade/src/index.ts#L263-L290](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-upgrade/src/index.ts#L263-L290)
- The Oxide scanner ships language-aware pre-processors for 14 template dialects, dispatched by file extension: Clojure, Elixir/HEEx, Razor, Haml, JSON, Markdown, Pug, Ruby/ERB, Slim, Svelte, Rust, Template Toolkit, Twig, and Vue. — [crates/oxide/src/scanner/mod.rs#L541-L560](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/crates/oxide/src/scanner/mod.rs#L541-L560) [crates/oxide/src/extractor/pre_processors/mod.rs](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/crates/oxide/src/extractor/pre_processors/mod.rs)
- Source maps are a supported output across surfaces: the core exposes `buildSourceMap()` returning a `DecodedSourceMap`, the CLI writes it inline or to a file via `--map`, and Vite emits it when `config.css.devSourcemap` is on. — [packages/tailwindcss/src/index.ts#L855-L862](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/tailwindcss/src/index.ts#L855-L862) [packages/@tailwindcss-cli/src/commands/build/index.ts#L226-L255](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-cli/src/commands/build/index.ts#L226-L255) [packages/@tailwindcss-vite/src/index.ts#L495-L505](https://github.com/tailwindlabs/tailwindcss/blob/41d9cae8e53378d16087fcf359eb785c2fd42ce4/packages/%40tailwindcss-vite/src/index.ts#L495-L505)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
