@tailwindcss/webpack
4.3.4 · 2 Nov 2026MIT555.5k / weekRepositoryHomepagenpmAtom feed
10 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