unstale

npm / @tailwindcss/vite

@tailwindcss/vite

What changed in @tailwindcss/vite 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

5 breaking1 deprecations10 new APIs and options1 performance9 behavior and defaults5 tooling59 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@tailwindcss/vite 490 changes

Breaking changes 5

  • Spacing utilities like m-1 and left-1 now generate var(--spacing) instead of calc(var(--spacing) * 1).

    4.3.1release notes

  • Canonicalization changes where the minus sign appears for negative arbitrary values.

    4.2.3release notes

  • .env and .env.* files are now excluded from default content scanning.

    4.2.3release notes

  • Canonicalization collapses matching axis-specific overscroll utilities into overscroll-*.

    4.2.3release notes

  • Canonicalization collapses matching arbitrary horizontal and vertical padding utilities into a single shorthand utility.

    4.2.3release notes

Deprecations 1

  • Deprecates start-* and end-* utilities in favor of inset-s-* and inset-e-* utilities.

    4.2.0release notes

New APIs and options 10

  • Adds utilities for block-size, min-block-size, and max-block-size.

    4.2.0release notes

  • Adds utilities for border-block-start and border-block-end.

    4.2.0release notes

  • Adds a utility for font-feature-settings.

    4.2.0release notes

  • Adds utilities for inline-size, min-inline-size, and max-inline-size.

    4.2.0release notes

  • Adds logical inset utilities for inline and block start and end.

    4.2.0release notes

  • Adds utilities for margin-block-start and margin-block-end.

    4.2.0release notes

  • Adds utilities for padding-block-start and padding-block-end.

    4.2.0release notes

  • Adds utilities for scroll-margin-block-start and scroll-margin-block-end.

    4.2.0release notes

  • Adds utilities for scroll-padding-block-start and scroll-padding-block-end.

    4.2.0release notes

  • Allows named groups to be combined with not-*, has-*, and in-*.

    4.1.15release notes

Performance 1

Behavior and default changes 9

  • Spacing utilities like m-0 and left-0 now generate 0 instead of calc(var(--spacing) * 0).

    4.3.1release notes

  • Canonicalization can move a negative sign outside an arbitrary value and use shorthand variable syntax.

    4.2.3release notes

  • Canonicalization collapses matching directional border utilities into axis-specific or general border utilities.

    4.2.3release notes

  • Canonicalization migrates end utilities, including negative versions, to their inset-e equivalents.

    4.2.3release notes

  • Canonicalization migrates start utilities, including negative versions, to their inset-s equivalents.

    4.2.3release notes

  • Canonicalization collapses matching axis-specific overflow utilities into overflow-*.

    4.2.3release notes

  • Canonicalization collapses matching directional scroll-margin utilities into axis-specific or general scroll-margin utilities.

    4.2.3release notes

  • Aspect fractions now allow multiples of .25, such as aspect-8.5/11.

    4.2.0release notes

  • Utilities containing capital letters followed by numbers are now detected.

    4.2.0release notes

Tooling 5

  • @tailwindcss/vite now supports Vite 8.

    4.2.2release notes

  • .jj is now included in the default ignored content directories.

    4.2.0release notes

  • The Vite integration now supports the environment API.

    4.1.18release notes

  • The upgrade process migrates deprecated break-words to wrap-break-word.

    4.1.15release notes

  • A dedicated Vite plugin is available as an alternative to the PostCSS plugin, with improved performance and developer experience.

    4.0.0upgrade guide

Fixes and other changes 59

  • No longer triggers full page reloads when Vite has processed scanned files that have not yet been loaded as modules.

    4.3.3release notes

  • Prevents crashes in Deno v2.8.x when context.parentURL is not a valid URL.

    4.3.2release notes

  • Prevents crashes during HMR when scanned files or directories are deleted.

    4.3.2release notes

  • Can now be used with CSS mixins.

    4.3.1release notes

  • Avoids crashing when plugin utilities throw for unsupported values.

    4.3.1release notes

  • No longer suggests invalid calc(…) expressions.

    4.3.1release notes

  • Avoids suggesting large spacing-scale values for arbitrary lengths.

    4.3.1release notes

  • Avoids folding calc(…) divisions when the result would require high precision.

    4.3.1release notes

  • Extracts candidates from Twig addClass(…) and removeClass(…) calls.

    4.3.1release notes

  • Color utilities work with custom shadow values containing calc(…).

    4.3.1release notes

  • Transitions between inset-shadow-none and other inset shadows now work correctly.

    4.3.1release notes

  • Uses Module#registerHooks instead of Module#register on Node 26+ to remove deprecation warnings.

    4.3.1release notes

  • Correctly negates @container queries, including style(…) queries.

    4.3.1release notes

  • Avoids crashes when scanning files containing invalid UTF-8 bytes.

    4.3.1release notes

  • Globs ending in **/* preserve dynamic path segments to avoid scanning too many files.

    4.3.1release notes

  • Preserves symlinks in source globs.

    4.3.1release notes

  • Later source rules can re-include files excluded by earlier @source not rules.

    4.3.1release notes

  • Explicitly referenced directories are scanned even when ignored by git.

    4.3.1release notes

  • Fixes 'Sourcemap is likely to be incorrect' warnings when using the Vite integration.

    4.3.1release notes

  • Can now be used inside addBase.

    4.3.1release notes

  • When using @tailwindcss/vite, @plugin resolves package JavaScript entries instead of browser CSS entries.

    4.3.0release notes

  • Relative @import and @plugin paths resolve from the correct directory when using @tailwindcss/vite.

    4.3.0release notes

  • CSS files containing @variant are processed by @tailwindcss/vite.

    4.3.0release notes

  • Imports in @import and @plugin now resolve correctly when using Vite aliases.

    4.2.4release notes

  • Invalid characters in candidates that exceed the valid Unicode code point range no longer cause a crash.

    4.2.3release notes

  • Placeholder utilities now read their color from --placeholder-color instead of --background-color.

    4.2.3release notes

  • Canonicalization collapses matching directional scroll-padding utilities into axis-specific or general scroll-padding utilities.

    4.2.3release notes

  • Canonicalization migrates overflow-ellipsis to text-ellipsis.

    4.2.3release notes

  • Canonicalization now prefers non-negative tracking utilities, such as converting -tracking-tighter to tracking-wider.

    4.2.3release notes

  • Expressions written as calc(var(--spacing)*…) are canonicalized into --spacing(…).

    4.2.2release notes

  • Candidates containing prototype properties like row-constructor no longer crash.

    4.2.2release notes

  • Server-only modules scanned by client CSS no longer trigger a full reload when using @tailwindcss/vite.

    4.2.2release notes

  • @tailwindcss/vite resolves tsconfig paths for imports such as @import '@/path/to/file';.

    4.2.2release notes

  • Canonicalization no longer crashes when handling utilities containing @property at-rules.

    4.2.2release notes

  • Bare values exceeding default spacing scale suggestions are canonicalized more effectively, such as w-1234 h-1234 to size-1234.

    4.2.2release notes

  • Canonicalization no longer produces an empty list for equivalent utilities such as w-5 h-5 size-5.

    4.2.2release notes

  • Functional utility names can now end with a trailing dash for backwards compatibility.

    4.2.1release notes

  • Classes containing . characters within curly braces in MDX files are now properly detected.

    4.2.1release notes

  • Prevents a duplicate @supports wrapper from being emitted for color-mix values.

    4.2.0release notes

  • The default theme adds mauve, olive, mist, and taupe color palettes.

    4.2.0release notes

  • Whitespace around the @source inline() argument is now allowed.

    4.2.0release notes

  • Changes to external files listed via @source now trigger a full page reload.

    4.2.0release notes

  • Import aliases in Astro v5 now work without crashing.

    4.2.0release notes

  • Utility name validation now aligns with Oxide scanner rules.

    4.2.0release notes

  • Utility names now allow escape characters, improving support with formatters such as Biome.

    4.2.0release notes

  • Fixes an infinite loop when @variant is used inside @custom-variant.

    4.2.0release notes

  • Substitute @variant inside legacy JS APIs.

    4.1.17release notes

  • Prevent an occasional crash on Windows when loaded into a worker thread.

    4.1.17release notes

  • Fixes canonicalization of arbitrary variants that use attribute selectors.

    4.1.16release notes

  • Improves canonicalization for arbitrary variants using & > :pseudo and & :pseudo selectors.

    4.1.16release notes

  • Candidates with an empty data type are discarded, preventing them from affecting candidate processing.

    4.1.16release notes

  • Fixes invalid colors caused by nested &.

    4.1.16release notes

  • Fixes a parsing issue when \t is used in at-rules.

    4.1.15release notes

  • Fixes a Safari DevTools rendering issue caused by the color-mix fallback.

    4.1.15release notes

  • Suppresses Lightning CSS warnings about :deep, :slotted, and :global.

    4.1.15release notes

  • Prevents important utilities from affecting other utilities.

    4.1.15release notes

  • Fixes resolving theme keys that start with the name of another theme key in JS configs and plugins.

    4.1.15release notes

  • The theme(…) function no longer indexes into strings.

    4.1.15release notes

  • Canonicalizes utilities containing 0 values during upgrades.

    4.1.15release notes