Latest in branch 2.2
2.2.19
Released 29 Oct 2021
(4 years ago)
SoftwareTailwind CSS
Branch2.2
Initial release2.2.0
17 Jun 2021
(4 years ago)
Latest release2.2.19
29 Oct 2021
(4 years ago)
Support status09 Dec 2021
(Ended 4 years, 5 months ago)
Release noteshttps://github.com/tailwindlabs/tailwindcss/releases/tag/v2.2.19
Source codehttps://github.com/tailwindlabs/tailwindcss/tree/v2.2.19
Downloadhttps://github.com/tailwindlabs/tailwindcss/releases/tag/v2.2.19
Tailwind CSS 2.2 ReleasesView full list

What Is New in Tailwind CSS 2.2

Category Highlights
New Features All-new Tailwind CLI, pseudo-element variants (before/after, first-letter/line, selection, marker), peer sibling variants, exhaustive pseudo-class support, caret-color utilities, background-origin utilities.
Improvements Shorthand color opacity syntax, extended arbitrary value support with type-hints, improved PostCSS nesting compatibility, per-side border-color utilities, built-in safelist/transform/extract for JIT.
Breaking Changes Transform, filter, and backdrop-filter classes are no longer required; they are automatically enabled, which may affect conditional toggling logic.

How does the new Tailwind CLI improve the development workflow?

The new CLI lets you compile Tailwind without any configuration files.

  • Run
    npx tailwindcss -o dist/tailwind.css --watch --jit --purge="./src/**/*.html"
    from any directory.
  • Watch mode automatically rebuilds CSS on file changes.
  • Use --minify to pipe the output through cssnano for production-ready files.
  • PostCSS plugins are respected via a postcss.config.js file, so you can keep your existing pipeline.

In practice this means fewer moving parts and faster JIT builds because the CLI is Tailwind-specific.

How can I style pseudo-elements and advanced selectors with Tailwind 2.2?

Tailwind now ships first-party variants for ::before, ::after, ::first-letter, ::first-line, ::selection, ::marker, and sibling selectors.

  • before: and after: add content and styling, e.g.
    <div class="before:block before:bg-blue-500 after:flex after:bg-pink-300"></div>
  • Use first-letter: for drop caps: first-letter:text-4xl first-letter:font-bold.
  • Apply a global text highlight with selection:bg-pink-200 on body to cascade.
  • Style list bullets via marker:text-gray-500.
  • Target previous siblings using peer-* variants, e.g. peer-checked:bg-blue-500 for custom checkboxes.
  • All missing pseudo-classes like placeholder-shown, only-child, valid, etc., are now available.

This matters if you need fine-grained UI polish without writing custom CSS.

What's new with color opacity and arbitrary values in Tailwind 2.2?

Tailwind now supports opacity directly in color utilities and far more arbitrary value syntax.

  • Shorthand opacity: bg-red-500/25 replaces bg-red-500 bg-opacity-25.
  • Arbitrary opacity via brackets: bg-red-500/[0.31].
  • Arbitrary values can be used on almost any utility: col-start-[73] placeholder-[#aabbcc] object-[50%].
  • When using CSS variables, add a type hint: text-[color:var(--mystery-var)] to disambiguate.

In practice this reduces class noise and lets you fine-tune designs on the fly.

How have transforms, filters, and border utilities changed in Tailwind 2.2?

Transform and filter utilities are now auto-enabled, and per-side border colors have been added.

  • Drop the transform and filter wrappers: <div class="scale-50 grayscale backdrop-blur-sm">.
  • If you previously toggled transform on hover, switch to toggling the sub-utility directly, e.g. hover:scale-105.
  • New per-side border color utilities: border-t-blue-500 border-r-pink-500 border-b-green-500 border-l-yellow-500.
  • Caret color utilities: caret-red-500 for form field cursors.
  • Background origin utilities: bg-origin-border, bg-origin-padding, bg-origin-content.

Watch out for the breaking change around implicit transform/filter activation when migrating existing conditional classes.

Frequently Asked Questions

What command compiles Tailwind CSS using the new CLI?
Run npx tailwindcss -o output.css --watch to compile and watch your files.

How do I enable Just-in-Time mode with the CLI?
Add the --jit flag to the command, for example npx tailwindcss -o dist.css --jit --purge="./src/**/*.html".

Which utility lets me set the cursor color in form fields?
Use the caret-{color} utilities such as caret-red-500.

How can I apply a background color with custom opacity in a single class?
Use the slash syntax like bg-red-500/25 to set a 25% opacity background.

What variant should I use to style the ::before pseudo-element?
Apply the before: prefix, for example before:bg-blue-500 before:block.

How do I target a sibling checkbox state with Tailwind 2.2?
Use the peer-checked: variant on the sibling element, e.g. peer-checked:bg-blue-500.

Releases In Branch 2.2

VersionRelease date
2.2.1929 Oct 2021
(4 years ago)
2.2.1829 Oct 2021
(4 years ago)
2.2.1713 Oct 2021
(4 years ago)
2.2.1626 Sep 2021
(4 years ago)
2.2.1510 Sep 2021
(4 years ago)
2.2.1408 Sep 2021
(4 years ago)
2.2.1308 Sep 2021
(4 years ago)
2.2.1208 Sep 2021
(4 years ago)
2.2.1107 Sep 2021
(4 years ago)
2.2.1006 Sep 2021
(4 years ago)
2.2.930 Aug 2021
(4 years ago)
2.2.827 Aug 2021
(4 years ago)
2.2.723 Jul 2021
(4 years ago)
2.2.621 Jul 2021
(4 years ago)
2.2.521 Jul 2021
(4 years ago)
2.2.423 Jun 2021
(4 years ago)
2.2.323 Jun 2021
(4 years ago)
2.2.118 Jun 2021
(4 years ago)
2.2.218 Jun 2021
(4 years ago)
2.2.017 Jun 2021
(4 years ago)