tailwindlabs/tailwindcss
Lore
Tailwind CSS started as a side experiment in mid-2017 and has since become one of the most-used CSS frameworks on the planet. The codebase has been almost entirely rewritten twice — once for the JIT engine in v3 and again for the CSS-first architecture in v4. This page is a narrative of how it got here, derived from git tags, commit timestamps, and directory creation dates.
Eras
The original (Jul 2017 – May 2019)
- Jul 20, 2017 — Initial commit (
421c1b0d Init). The repo was bootstrapped by Adam Wathan; the early history is dominated by his name. - May 13, 2019 —
v1.0.0ships.
The original engine was a JavaScript library that processed a Tailwind config file and generated a giant CSS file via PostCSS. Configuration lived entirely in tailwind.config.js. None of this code remains in the repo today, but the v3-compatibility layer in packages/tailwindcss/src/compat/ exists specifically to keep that ecosystem of plugins and configs alive.
Stabilization (May 2019 – Nov 2020)
- Nov 18, 2020 —
v2.0.0.
This era added dark mode, JIT (initially as @tailwindcss/jit), and the variants system that v4 still recognizes. The number of contributors grew significantly during this period.
The JIT era (Nov 2020 – Dec 2021)
- Dec 9, 2021 —
v3.0.0. JIT became the default engine. The framework no longer pre-generated every utility; it scanned source files and produced only the classes you used.
This was the architectural pattern that v4 inherits: scan for candidates, compile only what's needed. The big difference is the implementation language: v3's scanner was JavaScript regex; v4's is a Rust state-machine engine.
The v4 reset (Mar 2024 – Jan 2025)
- Mar 5, 2024 — First commits in
packages/tailwindcss/,packages/@tailwindcss-vite/,packages/@tailwindcss-postcss/. The v4 rewrite begins. - Mar 6, 2024 — First commit in
packages/@tailwindcss-cli/. - Mar 23, 2024 — Rust crates (
crates/oxide/,crates/node/) appear. The scanner moves out of JavaScript. - Sep 2, 2024 —
packages/@tailwindcss-node/is split out as a shared Node-only helper package. - Sep 18, 2024 —
packages/@tailwindcss-upgrade/lands. The migration tool is built alongside v4 itself rather than after-the-fact. - Jan 7, 2025 —
packages/@tailwindcss-browser/ships, enabling Tailwind to run entirely in the browser without a build step. - Jan 21, 2025 —
v4.0.0ships.
The v4 era is a near-total rewrite. Configuration moved from JavaScript to CSS (@theme, @utility, @variant, @plugin, @source). The compiler runs against a real CSS AST instead of a string-based pipeline. The scanner is Rust. The framework gained source maps. v3 configs and plugins still work, but through a deliberate compatibility bridge in packages/tailwindcss/src/compat/.
The 4.x release cadence (Jan 2025 – present)
- Apr 1, 2025 —
v4.1.0. - Feb 18, 2026 —
v4.2.0. - Apr 21, 2026 —
v4.2.4.
Recent additions (from CHANGELOG.md):
@tailwindcss/webpacklands inv4.2.0(Feb 2026). The first commits inpackages/@tailwindcss-webpack/are dated Jan 29, 2026.- Logical-axis utilities (
pbs-*/pbe-*,mbs-*/mbe-*,inset-s-*/inset-e-*,inline-*/block-*) are added inv4.2.0. - Stacked and compound
@variant(@variant hover:focus { … },@variant hover, focus { … }) ship in the unreleased branch (April 2026). - Source map visualization for tests is the most recent commit at the time of writing (
1ca0aacd, 2026-04-30).
Longest-standing code
The current repo's "v4" code only dates back to March 2024, but a handful of files predate that window because they survived the rewrite or were copied verbatim from v3:
LICENSE— present since the first commit (Init, 2017-07-20).README.md— present since the first commit; rewritten many times.CHANGELOG.md— kept continuously since the v0.x days; entries for every version back to early 2017 are still in the file.
Everything under packages/ and crates/ is post-March 2024. The pre-v4 source code is no longer present in main; you would need to consult the v3.4.x branch / tags to see it.
Deprecated features
This is a v4 codebase, so most "deprecated" things are v3 surface area that has been moved into packages/tailwindcss/src/compat/ rather than removed outright:
- JavaScript config files (
tailwind.config.js). Still load via@config "./tailwind.config.js"but the canonical configuration model is now CSS (@theme). @tailwind base,@tailwind components,@tailwind utilitiesdirectives. v4 collapses these into a single@import "tailwindcss"import. The upgrade tool'smigrate-tailwind-directives.tsrewrites the v3 form.tailwindcss/pluginimport shape. Plugins still work via@plugin "./plugin.js", but plugin authors now have access to the v4 plugin API (packages/tailwindcss/src/compat/plugin-api.ts).safelist/contentconfig keys. Replaced by@sourcein CSS.prefix: 'tw-'config option. Replaced by@import "tailwindcss" prefix(tw)syntax.
The upgrade tool (packages/@tailwindcss-upgrade/) automates all of these migrations.
Major rewrites
The JIT engine (2020–2021)
JIT started as a sidecar package (@tailwindcss/jit) before being merged into the main package as the default engine for v3. This was the first time the framework scanned source code rather than enumerating every possible utility. The pattern survives in v4.
The v4 rewrite (2024–2025)
Far larger in scope:
- The compiler was rewritten from a PostCSS-plugin pipeline into a CSS-AST compiler in
packages/tailwindcss/. - The scanner moved from JavaScript regex into a Rust state-machine extractor in
crates/oxide/. - Configuration moved from JavaScript to CSS. The new
@theme,@utility,@variant, and@sourceat-rules became the primary configuration surface. - New first-party packages were created for each major bundler (Vite, PostCSS, Webpack) and host (Node, browser).
- The
@tailwindcss/upgradecodemod tool was built specifically to make this rewrite safe to adopt.
The transition spanned roughly ten months of focused commits between March 2024 and January 2025 before v4.0.0 was released, with continued churn afterwards.
Growth trajectory
Every time the framework crossed a major version, the surface area grew:
- v1 → v2 (May 2019 → Nov 2020): dark mode, JIT preview, more utilities.
- v2 → v3 (Nov 2020 → Dec 2021): JIT becomes the default; arbitrary values; arbitrary variants; the
contentconfig replaces the explicit purge step. - v3 → v4 (Dec 2021 → Jan 2025): Rust scanner; CSS-first config; native source maps; Vite/PostCSS/Webpack/browser packages; logical properties; first-party upgrade tool.
The contributor base also expanded substantially during the v4 work. The four most active human contributors on origin/main are Adam Wathan (founder, 2,899 commits), Robin Malfait (901 commits, dominant on every v4 directory), Jordan Pittman (441), and Philipp Spiess (291). After them, contribution counts drop quickly into the long tail. The remainder of the top of the list is bot-attributed dependency bumps (depfu[bot], dependabot[bot]).
For up-to-date file ownership, see maintainers.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.