@tailwindcss/oxide
4.3.4 · 2 Nov 2026MIT112.9M / weekRepositorynpmAtom feed
47 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
4.3.4
2 Nov 2026Add
@tailwindcss/turbopack, a Turbopack loader for using Tailwind CSS with Next.jsEnsure watch mode detects changes to symlinked
@sourcefiles whose real paths aren't otherwise scannedEnsure variants using
@scopewrap generated utilities instead of nesting inside them
Added
Add
@tailwindcss/turbopack, a Turbopack loader for using Tailwind CSS with Next.js
Fixed
Ensure watch mode detects changes to symlinked
@sourcefiles whose real paths aren't otherwise scannedEnsure variants using
@scopewrap generated utilities instead of nesting inside themEnsure nested
@scoperules preserve their scoping semantics when flattenedPreserve declarations directly inside
@scopeby wrapping them in:where(:scope)Ensure generated utilities include a space in empty
var()fallbacks (e.g.var(--tw-blur,)→var(--tw-blur, ))Canonicalization: Convert arbitrary breakpoint and container query variants to named equivalents (e.g.
max-[64rem]:flex→max-lg:flex)Prevent
@tailwindcss/vitefrom crashing on every edit under Vite's experimentalbundledDevmodeEnsure
@tailwindcss/oxidefalls back to WASM on platforms without native bindingsExtract class candidates from Ruby
%wand%Wliterals using angle brackets or custom delimiters (e.g.%w<flex>,%w|flex|), including in Slim and Haml templatesPreserve whitespace in
--default(…)values in functional@utilitydefinitions (e.g.--default(box alphabetic)no longer becomesboxalphabetic)Ensure automatic source detection respects negation-based
.gitignorefiles (e.g./*followed by!/…patterns)Ensure root
theme('…')namespace lookups in JavaScript plugins and config files return the full namespace object instead of the value of itsDEFAULTkeySkip ignored directories when generating watch globs instead of walking their contents on every rebuild
Drop invalid UTF-8 candidates during class detection
Prevent
@tailwindcss/vitefrom forcing full-page reloads for scanned files that Vite does not handle as modules (e.g..phpfiles)Canonicalization: Don't merge utilities that reference different theme variables set to CSS-wide keywords like
unsetDon't generate utilities when a modifier is used that would otherwise be silently ignored (e.g.
rounded-sm/[5],shadow-sm/foo,stroke-2/50)Preserve
and,or, andnotinside selectors insupports-[…]variants (e.g.supports-[selector(a:not(.foo))]:flex)Don't warn about Angular's
::ng-deepand:host-context()when optimizing CSSDon't generate CSS for candidates containing an empty additional modifier (e.g.
bg-red-500/50/andgroup-hover/foo//bar:flex)Ensure
min-*,max-*, and container query variants with decimal values are sorted numerically (e.g.min-[40.25rem]beforemin-[40.5rem])Ensure CSS comments ending with
\*/are closed correctly instead of swallowing the CSS that follows (e.g./* C:\temp\*/)Improve style invalidation performance of
group-*andpeer-*variantsEnsure cached compilers release their
loadModuleandloadStylesheetcallbacks after compilationCanonicalization: Preserve
&when moving a pseudo-element into*or**(e.g.[&_::before]:flex→**:[&::before]:flex)Ensure the
Set.prototype.intersectionpolyfill incanonicalizeCandidates(…)returns the intersection instead of the first set on Node.js < 22Canonicalization: Ensure inline
theme(…)alphas with more than 2 decimals migrate to a percentage modifier with the same opacity (e.g.theme(colors.red.500/.12345)→text-red-500/[12.345%], nottext-red-500/[12.345])Canonicalization: Preserve inline
theme(…)alphas as an arbitrary percentage when a custom--opacity-*theme value would change the opacity (e.g.theme(colors.red.500/50%)→text-red-500/[50%]with--opacity-50: 10%)Ensure the
@propertyfallback isn't applied in Safari versions that no longer supportmargin-trim: inlineTreat viewport units like
dvminandsviand font-relative units likecapandrexas lengths in arbitrary values (e.g.text-[10dvmin]generatesfont-sizeinstead ofcolor)Write plugin logs to stderr in
tailwindcss canonicalizeso they don't end up in the results on stdoutExtract class shorthands on later lines when Pug text, comments, or quoted attribute values contain unbalanced brackets, or a quote that doesn't start a string (e.g.
input(pattern=/"/.source)) (#20547, #20572)Underline the correct occurrence of an unsupported data type in
--value(…)warningsCanonicalization: Prefer an existing candidate when collapsing utilities over another utility with the same default theme value (e.g.
text-foreground text-primary→text-primary, nottext-card-checked-border)Canonicalization: Don't collapse utilities into a utility that uses another theme variable with the same default value (e.g.
mt-card mb-card→my-card, notmy-4)Ensure
@tailwindcss/postcssrewrites relativeurl(…)s of stylesheets that are inlined before it runs (e.g.@imports in Vite) in optimized buildsDrop nested rules that put a combinator after a pseudo-element when using pseudo-element variants (e.g.
selection:*on a utility with a nested& > *rule)Don't generate CSS for arbitrary values with unbalanced parentheses or brackets (e.g.
w-[calc(1px]or[--x:a[b])Canonicalization: Prevent
collapse: truefrom taking exponentially longer when classes are linked through a utility that sets many properties (e.g.sr-only)Ensure
&is substituted inside:-moz-any(…)and:-webkit-any(…)in custom variants (e.g.@custom-variant firefox (:-moz-any(&));)Ensure the standalone macOS binaries have a valid code signature, so macOS 27 no longer kills them at launch
Ensure
@tailwindcss/turbopackand@tailwindcss/webpackrebuild when the input CSS changes (e.g.next devwith Turbopack no longer serves the CSS of the previous edit)Canonicalization: Don't drop a utility that sets a
--tw-*variable when an unrelated property has the same value (e.g.link mt-4no longer becomesmt-4whenlinksetsmargin-top: 16pxand--tw-translate-x: 16px)Decode single-digit hexadecimal escapes in theme variable and
@utilitynames as the CSS spec does (e.g.@theme { --color-\0: red; }no longer registers--color-0)Don't treat
!importantinside strings, comments orurl()in declaration values as the important flag (e.g.content: "a !important b")Parse a custom property at the end of the input when it has no trailing
;(e.g.--foo: baras the last declaration)Keep a declaration without a
;at the end of the CSS input (e.g.color: red)
4.3.3
16 Jul 2026Support
--watch --poll[=ms]in@tailwindcss/cliwhen filesystem events are unreliable or unavailableCanonicalization: Match arbitrary hex colors against theme colors case-insensitively (e.g.
bg-[#fff]andbg-[#FFF]→bg-white)Prevent Preflight from overriding Firefox's native
iframe:focus-visibleoutline styles
Fixed
Support
--watch --poll[=ms]in@tailwindcss/cliwhen filesystem events are unreliable or unavailableCanonicalization: Match arbitrary hex colors against theme colors case-insensitively (e.g.
bg-[#fff]andbg-[#FFF]→bg-white)Prevent Preflight from overriding Firefox's native
iframe:focus-visibleoutline stylesEnsure
theme('colors.foo')in JS plugins resolves correctly when both--color-fooand--color-foo-barexistEnsure fractional opacity modifiers work with named shadow sizes like
shadow-sm/12.5,text-shadow-sm/12.5,drop-shadow-sm/12.5, andinset-shadow-sm/12.5Parse selectors like
[data-foo]divas two selectors instead of oneEnsure
@tailwindcss/postcssrebuilds when a preprocessor like Sass changes the input CSS without changing the input file on diskEnsure CSS nesting is handled even when Lightning CSS isn't run, such as in
@tailwindcss/browserand Tailwind PlayPrevent achromatic theme colors from shifting hue when mixed in polar color spaces like
oklchEnsure
--spacing(0)is optimized to0pxinstead of0so it remains a<length>when used incalc(…)Load
@parcel/watcheronly when needed in@tailwindcss/cli --watchmode, so one-off builds and--watch --pollwork when@parcel/watchercan't be loadedUse explicit platform fonts instead of
system-uiandui-sans-serifso CJK text respects the page'slangattribute on WindowsPrevent
@tailwindcss/upgradefrom rewriting ignored files when run from a subdirectoryEnsure earlier
@sourcerules pointing to nested files are scanned when later@sourcerules point to files in parent foldersPrevent
@tailwindcss/vitefrom triggering full page reloads when scanned files are processed by Vite but haven't been loaded as modules yet
4.3.2
29 Jun 2026Support bare spacing values for
auto-rows-*andauto-cols-*utilities (e.g.auto-rows-12andauto-cols-16)Prevent
@tailwindcss/cliin--watchmode from crashing on Windows when@sourcepoints to a directory that doesn't existPrevent
@tailwindcss/vitefrom crashing in Deno v2.8.x whencontext.parentURLis not a valid URL
Fixed
Support bare spacing values for
auto-rows-*andauto-cols-*utilities (e.g.auto-rows-12andauto-cols-16)Prevent
@tailwindcss/cliin--watchmode from crashing on Windows when@sourcepoints to a directory that doesn't existPrevent
@tailwindcss/vitefrom crashing in Deno v2.8.x whencontext.parentURLis not a valid URLEnsure
@tailwindcss/cliin--watchmode rebuilds when the input CSS file changes in an ignored directoryAllow
@variantrules used inaddBase(…)to use custom variants defined laterPrevent
@tailwindcss/vitefrom crashing during HMR when scanned files or directories are deletedGenerate
font-sizeinstead ofcolordeclarations fortext-[--spacing(…)]Prevent
@sourcepatterns from scanning unrelated sibling files and foldersExtract class candidates adjacent to Template Toolkit delimiters like
%]…[%in.tt,.tt2, and.txfilesExtract class candidates from conditional Maud syntax like
p.text-black[condition]Prevent
@position-tryrules from triggering unknown at-rule warnings when optimizing CSSSupport class suggestions for named opacity modifiers from
--opacitytheme valuesPrevent type errors in
@tailwindcss/postcsswhen used with newer PostCSS patch releases
4.3.1
12 Jun 2026Add
--silentoption to suppress output in@tailwindcss/cliRemove deprecation warnings by using
Module#registerHooksinstead ofModule#registeron Node 26+Canonicalization: Don't crash when plugin utilities throw for unsupported values
Added
Add
--silentoption to suppress output in@tailwindcss/cli
Fixed
Remove deprecation warnings by using
Module#registerHooksinstead ofModule#registeron Node 26+Canonicalization: Don't crash when plugin utilities throw for unsupported values
Allow
@applyto be used with CSS mixinsEnsure
not-*correctly negates@containerqueries, includingstyle(…)queriesEnsure
drop-shadow-*color utilities work with custom shadow values containingcalc(…)Fix 'Sourcemap is likely to be incorrect' warnings when using
@tailwindcss/viteEnsure
@tailwindcss/webpackcan be installed in Rspack projects without requiringwebpackas a peer dependencyCanonicalization: Don't suggest invalid
calc(…)expressions (e.g.px-[calc(1rem+0px)]→px-[calc(1rem+0)])Canonicalization: Avoid suggesting large spacing-scale values for arbitrary lengths (e.g.
left-[99999px]→left-[99999px], notleft-24999.75)Ensure
@tailwindcss/cliin--watchmode recovers when a tracked dependency is deleted and restoredEnsure standalone
@tailwindcss/clibinaries are ignored when scanning for class candidatesEnsure class candidates are extracted from Twig
addClass(…)andremoveClass(…)callsDon't crash in the Ruby or Vue preprocessors when scanning files containing invalid UTF-8 bytes
Allow
@variantto be used insideaddBaseEnsure
@sourceglobs with symlinks are preservedEnsure later
@sourcerules can re-include files excluded by earlier@source notrulesUpgrade: Don't migrate empty class rules to invalid
@utilityrulesEnsure transitions between
inset-shadow-noneand other inset shadows work correctlyEnsure explicitly referenced
@sourcedirectories are scanned even when ignored by gitEnsure
@sourceglobs ending in**/*preserve dynamic path segments to avoid scanning too many filesCanonicalization: Don't fold
calc(…)divisions when the result would require high precision (e.g.w-[calc(100%/3.5)]→w-[calc(100%/3.5)], notw-[28.571428571428573%])Serve ESM type declarations to ESM importers of
@tailwindcss/postcss
Changed
Generate
0instead ofcalc(var(--spacing) * 0)for spacing utilities likem-0andleft-0Generate
var(--spacing)instead ofcalc(var(--spacing) * 1)for spacing utilities likem-1andleft-1
4.3.0
8 May 2026Add
@container-sizeutilityAdd
scrollbar-gutter-*utilities
Added
Add
@container-sizeutilityAdd
scrollbar-{auto,thin,none}utilities forscrollbar-width, andscrollbar-thumb-*/scrollbar-track-*color utilities forscrollbar-color(#19981, #20019)Add
scrollbar-gutter-*utilitiesAdd
zoom-*utilitiesAdd
tab-*utilitiesAllow using
@variantwith stacked variants (e.g.@variant hover:focus { … })Allow using
@variantwith compound variants (e.g.@variant hover, focus { … })Support
--default(…)in--value(…)and--modifier(…)for functional@utilitydefinitions
Fixed
Ensure
@pluginresolves package JavaScript entries instead of browser CSS entries when using@tailwindcss/viteFix relative
@importand@pluginpaths resolving from the wrong directory when using@tailwindcss/viteEnsure CSS files containing
@variantare processed by@tailwindcss/viteResolve imports relative to
basewhenresult.opts.fromis not provided when using@tailwindcss/postcssCanonicalization: Preserve significant
_whitespace in arbitrary valuesCanonicalization: Add parentheses when removing whitespace from arbitrary values would hurt readability (e.g.
w-[calc(100%---spacing(60))]→w-[calc(100%-(--spacing(60)))])Canonicalization: Preserve the original unit in arbitrary values instead of normalizing to base units (e.g.
-mt-[20in]→mt-[-20in], notmt-[-1920px])Canonicalization: Migrate arbitrary
:has()variants from[&:has(…)]tohas-[…]Upgrade: don’t migrate inline
styleattributes (e.g.style="flex-grow: 1"→style="flex-grow: 1", notstyle="grow: 1")Allow multiple
@utilitydefinitions with the same name but different value typesExport missing
PluginWithConfigtype fromtailwindcss/pluginto fix errors when inferring plugin config typesEnsure
startandendlegacy utilities without values do not generate CSSEnsure
--value(…)is required in functional@utilitydefinitionsCanonicalization: Preserve required whitespace around operators in negated arbitrary values (e.g.
-left-[(var(--a)+var(--b))])
4.2.4
21 Apr 2026Ensure imports in
@importand@pluginstill resolve correctly when using Vite aliases in@tailwindcss/vite
4.2.3
20 Apr 2026Canonicalization: Improve canonicalizations for
tracking-*utilities by preferring non-negative utilities (e.g.-tracking-tighter→tracking-wider)Fix crash due to invalid characters in candidate (exceeding valid unicode code point range)
Ensure query params in imports are considered unique resources when using
@tailwindcss/webpack
Fixed
Canonicalization: Improve canonicalizations for
tracking-*utilities by preferring non-negative utilities (e.g.-tracking-tighter→tracking-wider)Fix crash due to invalid characters in candidate (exceeding valid unicode code point range)
Ensure query params in imports are considered unique resources when using
@tailwindcss/webpackCanonicalization: Collapse arbitrary values into shorthand utilities (e.g.
px-[1.2rem] py-[1.2rem]→p-[1.2rem])Canonicalization: Collapse
border-{t,b}-*intoborder-y-*,border-{l,r}-*intoborder-x-*, andborder-{t,r,b,l}-*intoborder-*Canonicalization: Collapse
scroll-m{t,b}-*intoscroll-my-*,scroll-m{l,r}-*intoscroll-mx-*, andscroll-m{t,r,b,l}-*intoscroll-m-*Canonicalization: Collapse
scroll-p{t,b}-*intoscroll-py-*,scroll-p{l,r}-*intoscroll-px-*, andscroll-p{t,r,b,l}-*intoscroll-p-*Canonicalization: Collapse
overflow-{x,y}-*intooverflow-*Canonicalization: Collapse
overscroll-{x,y}-*intooverscroll-*Read from
--placeholder-colorinstead of--background-colorforplaceholder-*utilitiesUpgrade: Ensure files are not emptied out when killing the upgrade process while it's running
Upgrade: Use
config.contentwhen migrating from Tailwind CSS v3 to Tailwind CSS v4Upgrade: Never migrate files that are ignored by git
Add
.envand.env.*to default ignored content filesCanonicalization: Migrate
overflow-ellipsisintotext-ellipsisCanonicalization: Migrate
start-full→inset-s-full,start-auto→inset-s-auto,start-px→inset-s-px, andstart-<number>→inset-s-<number>as well as negative versionsCanonicalization: Migrate
end-full→inset-e-full,end-auto→inset-e-auto,end-px→inset-e-px, andend-<number>→inset-e-<number>as well as negative versionsCanonicalization: Move the
-sign inside the arbitrary value-left-[9rem]→left-[-9rem]Canonicalization: Move the
-sign outside the arbitrary valueml-[calc(-1*var(--width))]→-ml-(--width)Improve performance when scanning JSONL / NDJSON files
Support
NODE_PATHenvironment variable in standalone CLI
4.2.2
18 Mar 2026Support Vite 8 in
@tailwindcss/viteDon't crash when candidates contain prototype properties like
row-constructorCanonicalize
calc(var(--spacing)*…)expressions into--spacing(…)
Added
Support Vite 8 in
@tailwindcss/vite
Fixed
Don't crash when candidates contain prototype properties like
row-constructorCanonicalize
calc(var(--spacing)*…)expressions into--spacing(…)Fix crash in canonicalization step when handling utilities containing
@propertyat-rules (e.g.shadow-sm border)Skip full reload for server only modules scanned by client CSS when using
@tailwindcss/viteImprove canonicalization for bare values exceeding default spacing scale suggestions (e.g.
w-1234 h-1234→size-1234)Fix canonicalization resulting in empty list (e.g.
w-5 h-5 size-5→''instead ofsize-5)
4.2.1
23 Feb 2026Allow trailing dash in functional utility names for backwards compatibility
Properly detect classes containing
.characters within curly braces in MDX files
4.2.0
18 Feb 2026- deprecated
Deprecate
start-*andend-*utilities in favor ofinset-s-*andinset-e-*utilities Add mauve, olive, mist, and taupe color palettes to the default theme
Add
@tailwindcss/webpackpackage to run Tailwind CSS as a webpack plugin
Added
Add mauve, olive, mist, and taupe color palettes to the default theme
Add
@tailwindcss/webpackpackage to run Tailwind CSS as a webpack pluginAdd
pbs-*andpbe-*utilities forpadding-block-startandpadding-block-endAdd
mbs-*andmbe-*utilities formargin-block-startandmargin-block-endAdd
scroll-pbs-*andscroll-pbe-*utilities forscroll-padding-block-startandscroll-padding-block-endAdd
scroll-mbs-*andscroll-mbe-*utilities forscroll-margin-block-startandscroll-margin-block-endAdd
border-bs-*andborder-be-*utilities forborder-block-startandborder-block-endAdd
inline-*,min-inline-*,max-inline-*utilities forinline-size,min-inline-size, andmax-inline-sizeAdd
block-*,min-block-*,max-block-*utilities forblock-size,min-block-size, andmax-block-sizeAdd
inset-s-*,inset-e-*,inset-bs-*,inset-be-*utilities forinset-inline-start,inset-inline-end,inset-block-start, andinset-block-endAdd
font-features-*utility forfont-feature-settings
Fixed
Prevent double
@supportswrapper forcolor-mixvaluesAllow whitespace around
@source inline()argumentEmit comment when source maps are saved to files when using
@tailwindcss/cliDetect utilities containing capital letters followed by numbers
Fix class extraction for Rails' strict locals
Align
@utilityname validation with Oxide scanner rulesFix infinite loop when using
@variantinside@custom-variantAllow multiples of
.25inaspect-*fractions (e.g.aspect-8.5/11)Ensure changes to external files listed via
@sourcetrigger a full page reload when using@tailwindcss/viteImprove performance of Oxide scanner in bigger projects by reducing file system walks
Ensure import aliases in Astro v5 work without crashing when using
@tailwindcss/viteAllow escape characters in
@utilitynames to improve support with formatters such as BiomeFix incorrect canonicalization results when canonicalizing multiple times
Add
.jjto default ignored content directories
Deprecated
- deprecated
Deprecate
start-*andend-*utilities in favor ofinset-s-*andinset-e-*utilities
4.1.18
11 Dec 2025Ensure validation of
source(…)happens relative to the file it is inInclude filename and line numbers in CSS parse errors
Skip comments in Ruby files when checking for class names
Fixed
Ensure validation of
source(…)happens relative to the file it is inInclude filename and line numbers in CSS parse errors
Skip comments in Ruby files when checking for class names
Skip over arbitrary property utilities with a top-level
!in the valueSupport environment API in
@tailwindcss/vitePreserve case of theme keys from JS configs and plugins
Write source maps correctly on the CLI when using
--watchHandle special defaults (like
ringColor.DEFAULT) in JS configsImprove backwards compatibility for
contenttheme key from JS configsUpgrade: Handle
futureandexperimentalconfig keysTry to canonicalize any arbitrary utility to a bare value
Validate candidates similarly to Oxide
Canonicalization: Combine
text-*andleading-*classesCorrectly handle duplicate CLI arguments
Don’t emit color-mix fallback rules inside
@keyframesCLI: Don't hang when output is
/dev/stdout
4.1.17
6 Nov 2025Substitute
@variantinside legacy JS APIsPrevent occasional crash on Windows when loaded into a worker thread
4.1.16
23 Oct 2025Discard candidates with an empty data type
Fix canonicalization of arbitrary variants with attribute selectors
Fix invalid colors due to nested
&
Fixed
Discard candidates with an empty data type
Fix canonicalization of arbitrary variants with attribute selectors
Fix invalid colors due to nested
&Improve canonicalization for
& > :pseudoand& :pseudoarbitrary variants
4.1.15
20 Oct 2025Fix Safari devtools rendering issue due to
color-mixfallbackSuppress Lightning CSS warnings about
:deep,:slotted, and:globalFix resolving theme keys when starting with the name of another theme key in JS configs and plugins
Fixed
Fix Safari devtools rendering issue due to
color-mixfallbackSuppress Lightning CSS warnings about
:deep,:slotted, and:globalFix resolving theme keys when starting with the name of another theme key in JS configs and plugins
Allow named groups in combination with
not-*,has-*, andin-*Prevent important utilities from affecting other utilities
Don’t index into strings with the
theme(…)functionFix parsing issue when
\tis used in at-rulesUpgrade: Canonicalize utilities containing
0valuesUpgrade: Migrate deprecated
break-wordstowrap-break-word
Changed
Remove the
postinstallscript from oxide
4.1.14
1 Oct 2025Handle
'syntax in ClojureScript when extracting classesHandle
@variantinside@custom-variantMerge suggestions when using
@utility
Fixed
Handle
'syntax in ClojureScript when extracting classesHandle
@variantinside@custom-variantMerge suggestions when using
@utilityEnsure that file system watchers created when using the CLI are always cleaned up
Do not generate
grid-columnutilities when configuringgrid-column-startorgrid-column-endDo not generate
grid-rowutilities when configuringgrid-row-startorgrid-row-endPrevent duplicate CSS when overwriting a static utility with a theme key
Show Lightning CSS warnings (if any) when optimizing/minifying
Use
defaultexport condition for@tailwindcss/viteRe-throw errors from PostCSS nodes
Detect classes in markdown inline directives
Ensure files with only
@themeproduce no output when builtSupport Maud templates when extracting classes
Upgrade: Do not migrate
variant = 'outline'during upgradesUpgrade: Show version mismatch (if any) when running upgrade tool
Upgrade: Ensure first class inside
classNameis migratedUpgrade: Migrate classes inside
*ClassNameand*Classattributes
4.1.13
4 Sep 2025Drop warning from browser build
Drop exact duplicate declarations when emitting CSS
Don't transition
visibilitywhen usingtransition
Changed
Drop warning from browser build
Drop exact duplicate declarations when emitting CSS
Fixed
Don't transition
visibilitywhen usingtransitionDiscard matched variants with unknown named values
Discard matched variants with non-string values
Show suggestions for known
matchVariantvaluesReplace deprecated
clipwithclip-pathinsr-onlyHide internal fields from completions in
matchUtilitiesIgnore
.vercelfolders by default (can be overridden by@source …rules)Consider variants starting with
@-to be invalid (e.g.@-2xl:flex)Do not allow custom variants to start or end with a
-or_(#18867, #18872)Upgrade: Migrate
ariatheme keys to@custom-variantUpgrade: Migrate
datatheme keys to@custom-variantUpgrade: Migrate
supportstheme keys to@custom-variant
4.1.12
14 Aug 2025Don't consider the global important state in
@applyAdd missing suggestions for
flex-<number>utilitiesFix trailing
)from interfering with extraction in Clojure keywords
Fixed
Don't consider the global important state in
@applyAdd missing suggestions for
flex-<number>utilitiesFix trailing
)from interfering with extraction in Clojure keywordsDetect classes inside Elixir charlist, word list, and string sigils
Track source locations through
@pluginand@configAllow boolean values of
process.env.DEBUGin@tailwindcss/nodeIgnore consecutive semicolons in the CSS parser
Center the dropdown icon added to an input with a paired datalist by default
Extract candidates in Slang templates
Improve error messages when encountering invalid functional utility names
Discard CSS AST objects with
falseorundefinedpropertiesAllow users to disable URL rebasing in
@tailwindcss/postcssviatransformAssetUrls: falseFix false-positive migrations in
addEventListenerand JavaScript variable namesFix Standalone CLI showing default Bun help when run via symlink on Windows
Read from
--border-color-*theme keys individe-*utilities for backwards compatibilityDon't scan
.hdrand.exrfiles for classes by default
4.1.11
26 Jun 2025Add heuristic to skip candidate migrations inside
emit(…)Extract candidates with variants in Clojure/ClojureScript keywords
Document
--watch=alwaysin the CLI's usage
Fixed
Add heuristic to skip candidate migrations inside
emit(…)Extract candidates with variants in Clojure/ClojureScript keywords
Document
--watch=alwaysin the CLI's usageAdd support for Vite 7 to
@tailwindcss/vite
4.1.10
11 Jun 2025Fix incorrectly generated CSS when using percentages in arbitrary values with calc (e.g.
w-[calc(100%-var(--offset))])
4.1.9
11 Jun 2025Correctly parse custom properties with strings containing semicolons
Upgrade: Migrate arbitrary modifiers without percentage signs to bare values (e.g.
/[0.16]→/16)Upgrade: Migrate CSS variable shorthands where fallback value contains function call
Fixed
Correctly parse custom properties with strings containing semicolons
Upgrade: Migrate arbitrary modifiers without percentage signs to bare values (e.g.
/[0.16]→/16)Upgrade: Migrate CSS variable shorthands where fallback value contains function call
Upgrade: Migrate negative arbitrary values to negative bare values (e.g.
mb-[-32rem]→-mb-128)Upgrade: Do not migrate
blurinwire:model.blurDon't add spaces around CSS dashed idents when formatting math expressions
4.1.8
28 May 2025Improve error messages when
@applyfailsUpgrade: Don't error when looking for
tailwindcssin pnpm monorepos
Added
Improve error messages when
@applyfails
Fixed
Upgrade: Do not migrate declarations that look like candidates in
<style>blocks (#18057, 18068)Upgrade: Don't error when looking for
tailwindcssin pnpm monoreposUpgrade: Don't error when updating dependencies in pnpm monorepos
Upgrade: Migrate deprecated
order-nonetoorder-0Support Leptos
class:attributes when extracting classesFix "Cannot read properties of undefined" crash on malformed arbitrary value
Upgrade: Migrate
-mt-[0px]tomt-[0px]instead of the other way aroundFix Haml pre-processing crash when there is no
\nat the end of the fileIgnore
.pnpm-storefolders by default (can be overridden by@source …rules)Fix PostCSS crash when calling
toJSON()
4.1.7
15 May 2025Upgrade: Migrate bare values to named values
Upgrade: Added cache to improve template migration performance
Allow
_before numbers during candidate extraction
Added
Upgrade: Migrate bare values to named values
Upgrade: Added cache to improve template migration performance
Fixed
Allow
_before numbers during candidate extractionPrevent duplicate suggestions when using
@themeand@utilitytogetherEnsure that media queries within
::beforeand::afterpseudo selectors create valid CSS rules in production buildsEnsure that the standalone CLI does not leave temporary files behind
Ensure
-rotate-*utilities properly negate arbitrary valuesIgnore custom variants using
:merge(…)selectors in legacy JS pluginsEnsure classes containing
.are properly extracted from Clojure filesUpgrade: Fix error when using
@import … source(…)Upgrade: Change casing of utilities with named values to kebab-case to match updated theme variables
Upgrade: Don't migrate strings that match utility names in Vue attribute bindings other than
class
4.1.6
9 May 2025Add support for generating source maps in development
Added
Upgrade: Automatically convert arbitrary values to named values when possible (e.g.
h-[1lh]toh-lh) (#17831, #17854)Add detailed logging about
@sourcedirectives, discovered files and scanned files when usingDEBUG=*(#17906, #17952)Add support for generating source maps in development
Fixed
Ensure negative arbitrary
scalevalues generate negative valuesFix HAML extraction with embedded Ruby
Don't scan files for utilities when using
@referenceFix incorrectly replacing
_within arbitrary modifier shorthandbg-red-500/(--my_opacity)Don't scan
.logfiles for classes by defaultEnsure that custom utilities applying other custom utilities don't swallow nested
@applyrulesDownload platform specific package if
optionalDependenciesare skipped
4.1.5
30 Apr 2025Support using
@tailwindcss/upgradeto upgrade between versions of v4.*Add
h-lh/min-h-lh/max-h-lhutilitiesTransition
display,visibility,content-visibility,overlay, andpointer-eventswhen usingtransitionto simplify@starting-styleusage
Added
Support using
@tailwindcss/upgradeto upgrade between versions of v4.*Add
h-lh/min-h-lh/max-h-lhutilitiesTransition
display,visibility,content-visibility,overlay, andpointer-eventswhen usingtransitionto simplify@starting-styleusage
Fixed
Don't scan
.geojsonor.dbfiles for classes by default (#17700, #17711)Hide default shadow suggestions when missing default shadow theme keys
Replace
_with.in theme suggestions for@utilityif surrounded by digitsSkip
color-mix(…)when opacity is100%PostCSS: Ensure that errors in imported stylesheets are recoverable
Upgrade: Bump all Tailwind CSS related dependencies during upgrade
Upgrade: Don't add
-to variants starting with@Upgrade: Don't format stylesheets that didn't change when upgrading
4.1.4
14 Apr 2025Add experimental
@tailwindcss/oxide-wasm32-wasitarget for running Tailwind in browser environments like StackBlitzEnsure
color-mix(…)polyfills do not cause used CSS variables to be removedEnsure
color-mix(…)polyfills create fallbacks for theme variables that reference other theme variables
Added
Add experimental
@tailwindcss/oxide-wasm32-wasitarget for running Tailwind in browser environments like StackBlitz
Fixed
Ensure
color-mix(…)polyfills do not cause used CSS variables to be removedEnsure
color-mix(…)polyfills create fallbacks for theme variables that reference other theme variablesFix brace expansion in declining ranges like
{10..0..5}and{0..10..-5}Work around a Chrome rendering bug when using the
skew-*utilitiesEnsure container query variant names can contain hyphens
Ensure
shadow-inherit,inset-shadow-inherit,drop-shadow-inherit, andtext-shadow-inheritinherit the shadow colorEnsure compatibility with array tuples used in
fontSizeJS theme keysEnsure folders with binary file extensions in their names are scanned for utilities
Upgrade: Convert
fontSizearray tuple syntax to CSS theme variables
4.1.3
4 Apr 2025Show warning when using unsupported bare value data type in
--value(…)PostCSS: Ensure changes to the input CSS file don't generate stale output when using Turbopack
Ensure classes are detected in Ruby's
%wsyntax in Slim templates
4.1.2
3 Apr 2025Don't rely on the presence of
@layer baseto polyfill@propertySupport setting multiple inset shadows as arbitrary values
Fix
drop-shadow-*utilities that are defined with multiple shadows
Fixed
Don't rely on the presence of
@layer baseto polyfill@propertySupport setting multiple inset shadows as arbitrary values
Fix
drop-shadow-*utilities that are defined with multiple shadowsPostCSS: Fix race condition when two changes are queued concurrently
PostCSS: Ensure files containing
@tailwind utilitiesare processedEnsure the
color-mix(…)polyfill creates fallbacks even when using colors that cannot be statically analyzedFix slow incremental builds with
@tailwindcss/viteand@tailwindcss/postscss(especially on Windows)Vite: Fix missing CSS file in Qwik setups
4.1.1
2 Apr 2025Disable padding in
@source inline(…)brace expansionInject polyfills after
@importand body-less@layerEnsure
@tailwindcss/clidoes not contain an import forjiti
4.1.0
1 Apr 2025- deprecated
Deprecate
bg-{left,right}-{top,bottom}in favor ofbg-{top,bottom}-{left,right}utilities - deprecated
Deprecate
object-{left,right}-{top,bottom}in favor ofobject-{top,bottom}-{left,right}utilities Add
details-contentvariant
Added
Add
details-contentvariantAdd
inverted-colorsvariantAdd
items-baseline-lastandself-baseline-lastutilities (#13888, #17476)Add
pointer-none,pointer-coarse, andpointer-finevariantsAdd
any-pointer-none,any-pointer-coarse, andany-pointer-finevariantsAdd safe alignment utilities
Add
user-validanduser-invalidvariantsAdd
wrap-anywhere,wrap-break-word, andwrap-normalutilitiesAdd
@source inline(…)and@source not inline(…)Add
@source not "…"Add
text-shadow-*utilitiesAdd
mask-*utilitiesAdd
bg-{position,size}-*utilities for arbitrary valuesAdd
shadow-*/<alpha>,inset-shadow-*/<alpha>,drop-shadow-*/<alpha>, andtext-shadow-*/<alpha>utilities to control shadow opacity (#17398, #17434)Add
drop-shadow-<color>utilitiesImprove compatibility with older versions of Safari and Firefox
Fixed
Follow symlinks when resolving
@sourcedirectivesDon't scan ignored files for classes when changing an ignored file triggers a rebuild using
@tailwindcss/cliSupport negated
contentrules in legacy JavaScript configurationInterpret syntax like
@("@")md:…as@md:…in Razor filesDisallow top-level braces, top-level semicolons, and unbalanced parentheses and brackets in arbitrary values
Ensure the
--theme(…)function still resolves to the CSS variables when using legacy JS pluginsDetect used theme variables in CSS module files (#17433, #17467)
Changed
Ignore
node_modulesby default (can be overridden by@source …rules)@sourcerules that include file extensions or point insidenode_modules/folders no longer consider your.gitignorerules- deprecated
Deprecate
bg-{left,right}-{top,bottom}in favor ofbg-{top,bottom}-{left,right}utilities - deprecated
Deprecate
object-{left,right}-{top,bottom}in favor ofobject-{top,bottom}-{left,right}utilities
4.0.17
26 Mar 2025Fix an issue causing the CLI to hang when processing Ruby files
4.0.16
25 Mar 2025Add support for literal values in
--value('…')and--modifier('…')Fix class extraction followed by
(in PugEnsure
@keyframesfor theme animations are emitted if they are referenced following a comma
Added
Add support for literal values in
--value('…')and--modifier('…')
Fixed
Fix class extraction followed by
(in PugEnsure
@keyframesfor theme animations are emitted if they are referenced following a commaVite: Ensure that updates to an imported CSS file are properly propagated after updating source files
Pre process
Slimtemplates embedded in Ruby filesError when input and output files resolve to the same file when using the CLI
Add missing suggestions when
--spacing(--value(integer, number))is usedAdd
::-webkit-details-markerpseudo tomarkervariant
4.0.15
20 Mar 2025Fix incorrect angle in
-bg-conic-*utilitiesFix
border-[12px_4px]being interpreted as aborder-colorinstead of aborder-widthWork around a crash in Safari 16.4 and 16.5 when using the default Preflight styles
Fixed
Fix incorrect angle in
-bg-conic-*utilitiesFix
border-[12px_4px]being interpreted as aborder-colorinstead of aborder-widthWork around a crash in Safari 16.4 and 16.5 when using the default Preflight styles
Pre-process
<template lang="…">in Vue filesEnsure that all CSS variables used by Preflight are prefixed
Prevent segfault when loaded in a worker thread on Linux
Ensure multiple
--value(…)or--modifier(…)calls don't delete subsequent declarationsFix class extraction followed by
(in SlimExport
PluginUtilsfromtailwindcss/pluginfor compatibility with v3Remove redundant
line-height: initialfrom PreflightIncrease Standalone hardware compatibility on macOS x64 builds
Ensure that the CSS file rebuilds if a new CSS variable is used from templates
Changed
The
--theme(…)function now returns CSS variables from your theme variables unless used inside positions where CSS variables are invalid (e.g. inside@mediaqueries)
4.0.14
13 Mar 2025Do not extract candidates with JS string interpolation
${Fix extraction of variants containing
.characterFix extracting candidates in Clojure/ClojureScript
4.0.13
11 Mar 2025Fix Haml pre-processing
Ensure
.nodeand.wasmfiles are not scanned for utilitiesImprove performance when scanning JSON files
Fixed
Fix Haml pre-processing
Ensure
.nodeand.wasmfiles are not scanned for utilitiesImprove performance when scanning JSON files
Fix extracting candidates containing dots in Haml, Pug, and Slim pre processors (#17094, #17085, #17113)
Don't create invalid CSS when encountering a link wrapped in square brackets
4.0.12
7 Mar 2025Vite: Fix
url(…)rebasing in transitively imported CSS filesPostCSS: Rebase
url(…)s in imported CSS filesEnsure utilities are sorted based on their actual property order
Fixed
Vite: Fix
url(…)rebasing in transitively imported CSS filesPostCSS: Rebase
url(…)s in imported CSS filesEnsure utilities are sorted based on their actual property order
Ensure strings in Pug and Slim templates are handled correctly
Ensure classes between
}and{are properly extractedFix
razor/cshtmlpre-processingEnsure extracting candidates from JS embedded in a PHP string works as expected
4.0.11
6 Mar 2025Ensure classes containing
--are extracted correctlyEnsure classes containing numbers followed by dash or underscore are extracted correctly
Ensure arbitrary container queries are extracted correctly
Fixed
Ensure classes containing
--are extracted correctlyEnsure classes containing numbers followed by dash or underscore are extracted correctly
Ensure arbitrary container queries are extracted correctly
Ensure classes ending in
[are extracted in Slim templating languageEnsure arbitrary variables with data types are extracted correctly
4.0.10
5 Mar 2025Add
col-<number>androw-<number>utilities forgrid-columnandgrid-rowEnsure
not-*does not remove:is(…)from variantsEnsure
@keyframesare correctly emitted when using a prefix
Added
Add
col-<number>androw-<number>utilities forgrid-columnandgrid-row
Fixed
Ensure
not-*does not remove:is(…)from variantsEnsure
@keyframesare correctly emitted when using a prefixDon't swallow
@utilitydeclarations when@applyis used in nested rulesEnsure
outline-hiddenbehaves likeoutline-noneoutside of forced colors modeAllow
!importanton CSS variables againVite: Do not crash when encountering an
.svgfile with#or?in the filenameEnsure utilities are properly detected within square brackets
Ensure utilities are properly detected using Angular's conditional class binding syntax
Ensure utilities starting with numbers are properly extracted from Slim templates
Discard arbitrary property candidates that have guaranteed-invalid property names
Changed
Removed
max-w-autoandmax-h-autoutilities as they generate invalid CSSReplaced the existing candidate extractor with a brand new extractor to improve maintainability, correctness, and performance
4.0.9
25 Feb 2025Make JS APIs available to plugins and configs in the Standalone CLI
Vite: Don't crash when importing a virtual module from JavaScript that ends in
.cssFix an issue where
@reference "…"would sometimes omit keyframe animations
Fixed
Make JS APIs available to plugins and configs in the Standalone CLI
Vite: Don't crash when importing a virtual module from JavaScript that ends in
.cssFix an issue where
@reference "…"would sometimes omit keyframe animationsEnsure
z-*!utilities are properly marked as!importantRead UTF-8 CSS files that start with a byte-order mark (BOM)
Ensure nested functions in selectors used with JavaScript plugins are not truncated
Changed
Emit variable fallbacks when using
@reference "…"instead of duplicate CSS variable declarations
4.0.8
21 Feb 2025Allow
@importwiththeme(…)options for stylesheets that contain more than just@themerulesDon't add
!importantto CSS variable declarations when using the important modifierVite: Ignore files and directories specified in your
.gitignorefile when using automatic source detection
Added
Allow
@importwiththeme(…)options for stylesheets that contain more than just@themerules
Fixed
Don't add
!importantto CSS variable declarations when using the important modifierVite: Ignore files and directories specified in your
.gitignorefile when using automatic source detectionVite: Don't rely on the module graph for detecting candidates to ensure setups with multiple Vite builds work as expected
Vite: Ensure Astro production builds always contain classes used in client-only components
Vite: Always scan raw file contents for utility classes before any other transforms have been applied to ensure utility classes are scanned without any additional escaping
Ensure utilities with more declarations are always sorted before utilities with fewer declarations when utilities only define CSS variables
Only include
translate-z-pxutilities once in compiled CSS
Changed
4.0.7
18 Feb 2025Export
tailwindcss/lib/util/flattenColorPalette.jsfor backward compatibilityFix sorting of numeric utility suggestions when they have different magnitudes
Show suggestions for fractions in IntelliSense
Fixed
Export
tailwindcss/lib/util/flattenColorPalette.jsfor backward compatibilityFix sorting of numeric utility suggestions when they have different magnitudes
Show suggestions for fractions in IntelliSense
Don’t replace
_in suggested theme keysEnsure
--default-outline-widthcan be used to change theoutline-widthvalue of theoutlineutilityEnsure drop shadow utilities don't inherit unexpectedly
Export config and plugin types from
tailwindcss/pluginfor backward compatibilityEnsure JavaScript plugins that emit nested rules referencing the utility name work as expected
Statically link Visual Studio redistributables in
@tailwindcss/oxideWindows buildsEnsure that Next.js splat routes are scanned for classes
Pin exact version of
tailwindcssin@tailwindcss/*packagesUpgrade: Report errors when updating dependencies
Upgrade: Ensure a
darkModeJS config setting with block syntax converts to use@slotUpgrade: Ensure the latest version of
tailwindcssand@tailwindcss/postcssare installed when upgrading
4.0.6
10 Feb 2025Revert change to no longer include theme variables that aren't used in compiled CSS
4.0.5
8 Feb 2025Add
@theme staticoption for always including theme variables in compiled CSSRemove rogue
console.logfrom@tailwindcss/viteDon't include theme variables that aren't used in compiled CSS
4.0.4
6 Feb 2025Fix a crash when setting JS theme values to
nullEnsure escaped underscores in CSS variables in arbitrary values are properly unescaped
Ensure that the
containersJS theme key is added to the--container-*namespace
Fixed
Fix a crash when setting JS theme values to
nullEnsure escaped underscores in CSS variables in arbitrary values are properly unescaped
Ensure that the
containersJS theme key is added to the--container-*namespaceEnsure theme
@keyframesare generated even if an--animation-*variable spans multiple linesVite: Skip parsing stylesheets with the
?commonjs-proxyflagFix
order-firstandorder-lastfor FirefoxFix support for older instruction sets on Linux x64 builds of the standalone CLI
Ensure
NODE_PATHis respected when resolving JavaScript and CSS filesEnsure Node addons are packaged correctly with FreeBSD builds
Fix an issue where
@variantinside a referenced stylesheet could cause a stack overflow
4.0.3
1 Feb 2025Fix incorrect removal of
@import url();
4.0.2
31 Jan 2025Only generate positive
grid-cols-*andgrid-rows-*utilitiesEnsure escaped theme variables are handled correctly
Ensure we process Tailwind CSS features when only using
@referenceor@variant
Fixed
Only generate positive
grid-cols-*andgrid-rows-*utilitiesEnsure escaped theme variables are handled correctly
Ensure we process Tailwind CSS features when only using
@referenceor@variantRefactor gradient implementation to work around prettier/prettier#17058
Vite: Ensure hot-reloading works with SolidStart setups
Vite: Fix a crash when starting the development server in SolidStart setups
Vite: Don't rebase URLs that appear to be aliases
Vite: Transform
<style>blocks in HTML filesPrevent camel-casing CSS custom properties added by JavaScript plugins
Do not emit
@keyframesin@theme referenceDiscard invalid declarations when parsing CSS
Do not emit empty CSS rules and at-rules
Handle
@variantwhen at the top-level of a stylesheet
4.0.1
29 Jan 2025Include
:openpseudo-class in existingopenvariantRemove invalid
min-w/h-noneutilitiesDiscard CSS variable shorthand utilities that don't use valid CSS variables
Added
Include
:openpseudo-class in existingopenvariant
Fixed
Remove invalid
min-w/h-noneutilitiesDiscard CSS variable shorthand utilities that don't use valid CSS variables
Ensure font-size utilities with
nonemodifier have a line-height set e.g.text-sm/noneEnsure font-size utilities with unknown modifier don't generate CSS
Don’t suggest font weight utilities more than once
Suggest container query variants
Disable bare value suggestions when not using the
--spacingvariableEnsure suggested classes are properly sorted
Don’t look at .gitignore files outside initialized repos
Find utilities when using the Svelte class shorthand syntax across multiple lines
Find utilities when using the Angular class shorthand syntax
Find utilities when using functions inside arrays
Ensure that
@tailwindcss/browserdoes not pollute the global namespaceEnsure that
tailwind-mergeis not scanned when using the Vite pluginEnsure CSS theme variables are available within shadow roots
Fix crash when project lives in the
/directoryEnsure custom variants have a non-empty selector list
Upgrade: Ensure JavaScript config files on different drives are correctly migrated
Upgrade: Migrate
leading-[1]toleading-noneUpgrade: Do not migrate arbitrary leading utilities to bare values
4.0.0
21 Jan 2025New high-performance engine — where full builds are up to 5x faster, and incremental builds are over 100x faster — and measured in microseconds.
Designed for the modern web — built on cutting-edge CSS features like cascade layers, registered custom properties with
@property, andcolor-mix().Simplified installation — fewer dependencies, zero configuration, and just a single line of code in your CSS file.
!(https://github.com/user-attachments/assets/cf527dc2-7e42-4884-9628-dbb27459d2aa)
Holy shit it's actually done — we just tagged Tailwind CSS v4.0.
Tailwind CSS v4.0 is an all-new version of the framework optimized for performance and flexibility, with a reimagined configuration and customization experience, and taking full advantage of the latest advancements the web platform has to offer.
New high-performance engine — where full builds are up to 5x faster, and incremental builds are over 100x faster — and measured in microseconds.
Designed for the modern web — built on cutting-edge CSS features like cascade layers, registered custom properties with
@property, andcolor-mix().Simplified installation — fewer dependencies, zero configuration, and just a single line of code in your CSS file.
First-party Vite plugin — tight integration for maximum performance and minimum configuration.
Automatic content detection — all of your template files are discovered automatically, with no configuration required.
Built-in import support — no additional tooling necessary to bundle multiple CSS files.
CSS-first configuration — a reimagined developer experience where you customize and extend the framework directly in CSS instead of a JavaScript configuration file.
CSS theme variables — all of your design tokens exposed as native CSS variables so you can access them anywhere.
Dynamic utility values and variants — stop guessing what values exist in your spacing scale, or extending your configuration for things like basic data attributes.
Modernized P3 color palette — a redesigned, more vivid color palette that takes full advantage of modern display technology.
Container queries — first-class APIs for styling elements based on their container size, no plugins required.
New 3D transform utilities — transform elements in 3D space directly in your HTML.
Expanded gradient APIs — radial and conic gradients, interpolation modes, and more.
@starting-style support — a new variant you can use to create enter and exit transitions, without the need for JavaScript.
not-* variant — style an element only when it doesn't match another variant, custom selector, or media or feature query.
Even more new utilities and variants — including support for
color-scheme,field-sizing, complex shadows,inert, and more.
Start using Tailwind CSS v4.0 today by installing it in a new project, or playing with it directly in the browser on Tailwind Play.
For existing projects, we've published a comprehensive upgrade guide and built an automated upgrade tool to get you on the latest version as quickly and painlessly as possible.
For a deep-dive into everything that's new, check out the announcement post.