Tailwind v3 to v4 Migration Guide (2026): Config, Breaking Changes and Upgrade Steps

By Eoin Villarin, 2025-12-10, updated 2026-11-14

Tailwind CSS v4.3.5 is the latest release. Here is what changed from v3, how the CSS-first Tailwind v4 config works, every breaking rename and a step-by-step migration with fixes for common errors.

How do I migrate from Tailwind CSS v3 to v4, and what is the latest version?

The latest Tailwind CSS version is v4.3.5, released on November 6, 2026. To migrate from v3, run npx @tailwindcss/upgrade on a new branch with Node.js 20 or higher, switch to @tailwindcss/vite or @tailwindcss/postcss, replace the @tailwind directives with @import "tailwindcss" and move your config into an @theme block (or load the old file with @config). Then check renamed utilities, the new currentColor border and ring defaults, and confirm your users run Safari 16.4+, Chrome 111+ or Firefox 128+.

Key takeaways

  • The latest Tailwind CSS release is v4.3.5 (November 6, 2026); v4.0 shipped January 22, 2025, v4.2 on February 18, 2026 and v4.3 on May 8, 2026.
  • Run npx @tailwindcss/upgrade on a branch with Node.js 20+ to update dependencies, move config to CSS and rewrite renamed classes.
  • Tailwind v4 config lives in CSS: @import "tailwindcss" plus an @theme block, with @config to keep a legacy tailwind.config.js.
  • Classes inside @layer utilities are no longer registered as utilities in v4; define them with @utility so variants work.
  • Watch the quiet changes: shadow-sm is now shadow-xs, outline-none is outline-hidden, and borders and rings default to currentColor.

Updated November 14, 2026. The latest version of Tailwind CSS is v4.3.5, released on November 6, 2026. Tailwind v4.0 shipped on January 22, 2025, and the 4.x line has had three feature releases since then (4.1, 4.2 and 4.3). Version 3 is still maintained on a separate v3-lts npm tag, currently 3.4.19.

Should you upgrade from v3 to v4? For most projects, yes. Start every new project on v4, and move active v3 projects over in a branch with the official upgrade tool, npx @tailwindcss/upgrade. The two real reasons to wait are browser support (v4 targets Safari 16.4+, Chrome 111+ and Firefox 128+) and a build that depends on Sass, Less or Stylus, which v4 does not support.

This guide is written for the questions people actually search for: what changed between Tailwind 3 and 4, how the Tailwind v4 config works without tailwind.config.js, what happened to layers, which classes were renamed, and how to migrate without leaving visual bugs behind. Every fact here links back to the official Tailwind docs, blog or GitHub releases in the Sources section at the end.

Tailwind CSS version history: 4.0 to 4.3.5

If you searched for "tailwindcss latest version", this table is the short answer. Dates come from the official GitHub releases and the Tailwind blog.

VersionReleasedWhat it added
v4.0January 22, 2025Ground-up rewrite, CSS-first config with @theme, automatic content detection, native cascade layers, container queries in core, 3D transforms, OKLCH colors
v4.1April 2025 (4.1.0 tagged April 1)text-shadow-*, mask-*, colored drop shadows, pointer-fine and pointer-coarse, user-valid and user-invalid, @source not, @source inline(), better fallbacks for older browsers
v4.2February 18, 2026Mauve, olive, mist and taupe palettes, logical property utilities, font-features-*, the @tailwindcss/webpack loader
v4.3May 8, 2026Scrollbar utilities, @container-size, zoom-*, tab-*, stacked and compound @variant, --default() in custom utilities
v4.3.4November 2, 2026New @tailwindcss/turbopack loader for Next.js, plus fixes
v4.3.5November 6, 2026Bug fixes (current latest on npm)
v3.4.19December 10, 2025Latest v3 release, published on the v3-lts npm tag

To check what your own project runs, look at the tailwindcss entry in package.json or run npm ls tailwindcss. If it starts with 3, everything below applies to you.

What changed in Tailwind v4?

Tailwind v4 is not a small version bump. The engine was rewritten, the configuration moved from JavaScript into CSS, and the generated CSS now leans on modern browser features such as cascade layers, registered custom properties with @property and color-mix(). Here is the summary in one table.

AreaWhat changed in v4Why it matters
EngineRewritten from scratch, with Lightning CSS handling imports, nesting and vendor prefixesFaster builds and no need for autoprefixer or postcss-import
Entry pointOne line: @import "tailwindcss";Replaces the three @tailwind directives
ConfigurationDesign tokens live in CSS inside @themetailwind.config.js is optional and no longer detected automatically
Content pathsAutomatic source detection that respects .gitignoreNo content array; use @source for edge cases
Theme valuesEvery token is emitted as a real CSS variableUse var(--color-brand-500) anywhere, no resolveConfig
LayersNative CSS @layer theme, base, components, utilitiesCustom utilities move to @utility
Build toolsSeparate packages: @tailwindcss/vite, @tailwindcss/postcss, @tailwindcss/cli, and later @tailwindcss/webpack and @tailwindcss/turbopackYour build config must change
DefaultsBorder, divide and ring colors default to currentColor; ring is 1pxThe most common source of visual bugs after upgrading
Utility namesShadow, blur, radius and drop shadow scales shifted down one stepshadow-sm is now shadow-xs, and so on
BrowsersSafari 16.4+, Chrome 111+, Firefox 128+Older browsers should stay on v3.4

Tailwind v4 performance numbers

The Tailwind team benchmarked v4.0 against v3.4 on their Catalyst UI kit in the official launch post. Full builds went from 378ms to 100ms, incremental rebuilds that add new CSS went from 44ms to 5ms, and incremental rebuilds with no new CSS went from 35ms to 192 microseconds. The headline of that post says "up to 5x faster" full builds and "over 100x faster" incremental builds, but the measured numbers in its own table are about 3.8x, 8.8x and 182x, so treat those as the realistic figures. In practice, hot reload feels instant even on large templates.

Since then, the v4.2 release added the @tailwindcss/webpack loader, which skips PostCSS. On the tailwindcss.com docs site with Next.js and Turbopack, Tailwind measured a build of 429ms with the loader against 932ms with @tailwindcss/postcss, about 2.17x faster.

Tailwind v3 vs v4: side by side comparison

If you only want the difference between Tailwind v3 and v4 at a glance, this is it.

TopicTailwind v3Tailwind v4
CSS entry@tailwind base; @tailwind components; @tailwind utilities;@import "tailwindcss";
Config filetailwind.config.js, detected automatically@theme in CSS; JS config only via @config
Template pathsManual content: [...] arrayAutomatic, plus @source
Safelistsafelist option@source inline("...")
Custom utilitiesClasses inside @layer utilities@utility name { ... }
Custom variantsJS plugin with addVariant@custom-variant in CSS
Pluginsplugins: [require(...)] in config@plugin "..."; in CSS
PostCSS plugintailwindcss plus autoprefixer@tailwindcss/postcss only
VitePostCSS setupFirst-party @tailwindcss/vite plugin
CLInpx tailwindcssnpx @tailwindcss/cli
ColorsRGB paletteOKLCH palette (wider P3 gamut)
Opacitybg-opacity-50bg-black/50 modifier
Container queriesPluginBuilt in: @container, @sm:, @max-md:
Variable shorthandbg-[--brand]bg-(--brand)
Important!flexflex!
Prefixtw-flextw:flex
Variant orderApplied right to leftApplied left to right
HoverApplies on tap on touch devicesOnly inside @media (hover: hover)
PreprocessorsSass and Less possibleNot supported
BrowsersWide supportSafari 16.4+, Chrome 111+, Firefox 128+

How to migrate from Tailwind v3 to v4, step by step

This is the process I follow on client projects. On a typical marketing site or mid-size app it takes a few hours, and most of that time goes into visual review, not code.

  1. Check your browsers first. Open your analytics and confirm that almost all real traffic uses Safari 16.4+, Chrome 111+ or Firefox 128+. If not, stop here and stay on v3.4.
  2. Create a branch and update Node.js. The upgrade tool needs Node.js 20 or higher.
  3. Run the official upgrade tool. It updates your dependencies, migrates your JavaScript config into CSS and rewrites renamed classes in your template files.
  4. Switch your build integration. Vite projects use @tailwindcss/vite, PostCSS projects use @tailwindcss/postcss, CLI users move to @tailwindcss/cli, and webpack or Next.js projects can use @tailwindcss/webpack or the new @tailwindcss/turbopack loader. Remove autoprefixer and postcss-import.
  5. Check the CSS entry file. It should start with @import "tailwindcss"; followed by your @theme block.
  6. Review the diff file by file. Class names built from strings, such as "shadow-" + size, cannot be rewritten by any tool. Search for them by hand.
  7. Fix component-scoped styles. Vue, Svelte and Astro <style> blocks and CSS modules need @reference to use @apply with your theme.
  8. Compare every key template in the browser at mobile and desktop widths. Screenshot tests are ideal, because the renamed shadows and new border colors are easy to miss by eye.

The commands and config files for the most common setups:

npx @tailwindcss/upgrade

If the tool did not already switch your build packages, install the one that matches your setup. For Vite:

npm install tailwindcss @tailwindcss/vite

For PostCSS setups such as Next.js, install the new plugin and remove the two packages v4 no longer needs:

npm install tailwindcss @tailwindcss/postcss
npm uninstall autoprefixer postcss-import

For Vite, add the plugin in vite.config.ts:

import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [tailwindcss()],
});

For PostCSS, the plugin name changes in postcss.config.mjs:

export default {
  plugins: {
    "@tailwindcss/postcss": {},
  },
};

Then replace the three old directives in your main stylesheet, @tailwind base;, @tailwind components; and @tailwind utilities;, with a single line:

@import "tailwindcss";

If you are also changing build tools during the upgrade, my comparison of Vite and webpack explains which one I would choose for a new project.

Tailwind v4 config: how CSS-first configuration works

The biggest mental shift in v4 is where configuration lives. There is no tailwind.config.js by default. You import Tailwind in your main CSS file and define design tokens as CSS variables inside an @theme block. Each variable belongs to a namespace, and the namespace decides which utilities it creates. For example, --color-brand-500 gives you bg-brand-500, text-brand-500, border-brand-500 and every other color utility.

Coloured pencils standing in a row, like a palette of design tokens defined in CSS
In v4, design tokens live in CSS and drive every utility. Photo: rawpixel, CC0

A minimal Tailwind v4 config with @theme

@import "tailwindcss";

@theme {
  --font-display: "Satoshi", sans-serif;
  --color-brand-500: oklch(0.62 0.21 285);
  --color-brand-900: oklch(0.28 0.09 280);
  --breakpoint-3xl: 120rem;
  --radius-card: 1.25rem;
  --shadow-soft: 0 8px 30px rgb(0 0 0 / 0.08);
  --ease-snappy: cubic-bezier(0.2, 0, 0, 1);
  --animate-fade-in: fade-in 0.3s ease-out;

  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

That one block gives you font-display, bg-brand-500, a 3xl: breakpoint, rounded-card, shadow-soft, ease-snappy and animate-fade-in, with no other setup. The main namespaces are:

  • --color-* for color utilities such as bg-*, text-* and fill-*
  • --font-*, --text-*, --font-weight-*, --tracking-* and --leading-* for typography
  • --breakpoint-* for responsive variants like sm: and lg:
  • --container-* for container query variants like @sm: and sizes like max-w-md
  • --spacing for the base spacing unit behind p-*, m-*, w-* and gap-*
  • --radius-*, --shadow-*, --inset-shadow-*, --drop-shadow-* and --blur-* for effects
  • --ease-* and --animate-* for motion

Extending, overriding and resetting the theme

Adding a new variable extends the default theme. Redefining an existing one, such as --breakpoint-sm: 30rem;, overrides it. To remove a whole default namespace, set it to initial first, for example --color-*: initial; followed by only your brand colors. --*: initial; removes the entire default theme so only your own tokens remain. This replaces the v3 pattern of choosing between theme and theme.extend.

Use @theme only for tokens that should create utilities. Plain CSS variables that should not create classes still belong in :root. @theme blocks must be at the top level, not inside a selector or media query.

@theme inline and @theme static

When a theme variable points to another variable, for example a font loaded by Next.js as --font-inter, use @theme inline { --font-sans: var(--font-inter); }. The generated utility then uses the value directly instead of resolving the variable where it was defined, which avoids unexpected fallbacks. By default Tailwind only outputs the CSS variables you actually use; @theme static outputs all of them, which helps when JavaScript reads tokens at runtime.

Keeping tailwind.config.js with @config

If your JavaScript config is too large to move in one go, keep it. JavaScript configs still work in v4, but they are not detected automatically. Load it explicitly at the top of your CSS:

@import "tailwindcss";
@config "../../tailwind.config.js";

@theme {
  --color-brand-500: oklch(0.62 0.21 285);
}

You can mix @config with @theme while you move tokens across in stages. Values defined in CSS are merged where possible and otherwise win over the JavaScript config. Three options are not supported at all in v4: corePlugins, safelist and separator. Safelisting now uses @source inline(), which supports brace expansion such as @source inline("{hover:,}bg-brand-{500,900}");. The resolveConfig helper was removed, so read tokens from CSS variables instead.

Dark mode and custom variants with @custom-variant

In v3 a class-based dark mode was a config setting. In v4 it is one line of CSS. The same directive replaces most small JavaScript variant plugins:

@import "tailwindcss";

@custom-variant dark (&:where(.dark, .dark *));

@custom-variant theme-midnight (&:where([data-theme="midnight"] *));

@plugin "@tailwindcss/typography";

@source "../node_modules/@acme/ui";
@source not "../src/legacy";

Now dark:bg-gray-900 responds to a .dark class and theme-midnight:bg-black responds to a data attribute. @plugin loads a JavaScript plugin such as typography or forms, and @source adds or excludes folders that automatic detection would otherwise miss or scan.

Tailwind v4 layers, @utility and @layer explained

Tailwind v4 uses real CSS cascade layers. The default import expands to @layer theme, base, components, utilities; followed by the theme, Preflight and utilities files, each placed in its own layer. Because utilities sit in the last layer, a utility class always beats a component class without any specificity tricks.

What changed for you as an author:

  • @layer base still works for default element styles, such as heading sizes using var(--text-2xl).
  • @layer components still works for classes like .card or third-party overrides, and utilities can still override them, so class="card rounded-none" behaves as expected.
  • @layer utilities no longer registers custom classes. In v3, anything inside it became a utility that worked with hover: and md:. In v4 you must use @utility instead.

In v3 you wrote a custom utility like this:

@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
}

In v4 the same class, plus a functional utility that reads values from your theme, looks like this:

@utility content-auto {
  content-visibility: auto;
}

@theme {
  --tab-size-2: 2;
  --tab-size-4: 4;
  --tab-size-github: 8;
}

@utility tab-* {
  tab-size: --value(--tab-size-*);
}

The functional form generates tab-2, tab-4 and tab-github from your theme. --value() can also accept bare numbers, literal keywords and arbitrary values, and since v4.3 it supports --default() so a bare class like tab gets a fallback value. Custom utilities are sorted by how many properties they set, so a @utility btn can still be overridden by single-purpose utilities.

If you want to drop Preflight, import the layers yourself instead of the single @import "tailwindcss"; line: declare the four layers, then import tailwindcss/theme.css into layer(theme) and tailwindcss/utilities.css into layer(utilities), and leave out tailwindcss/preflight.css.

Breaking renames and removals: before and after

The upgrade tool rewrites most of these automatically, but it helps to know them when you review the diff or write new code. The size scales for shadows, blur and radius shifted down one step so that every scale has a named value.

Laptop beside a second monitor on an office desk, for comparing before and after screenshots
Visual diffs catch renamed shadows, rings and borders early. Photo: rawpixel, CC0
Tailwind v3Tailwind v4Note
shadow-smshadow-xsScale moved down one step
shadowshadow-smBare shadow still exists but maps to the old look
drop-shadow-smdrop-shadow-xs
drop-shadowdrop-shadow-sm
blur-smblur-xs
blurblur-sm
backdrop-blur-smbackdrop-blur-xs
backdrop-blurbackdrop-blur-sm
rounded-smrounded-xs
roundedrounded-sm
outline-noneoutline-hiddenNew outline-none sets outline-style: none
ringring-3Bare ring is now 1px
outline outline-2outline-2Width utilities now set a solid style
bg-opacity-50 (and text, border, divide, ring, placeholder)bg-black/50Opacity utilities removed
flex-shrink-0, flex-growshrink-0, growOld names removed
overflow-ellipsistext-ellipsis
decoration-slice, decoration-clonebox-decoration-slice, box-decoration-clone
bg-gradient-to-rbg-linear-to-rAlso new bg-linear-45, bg-radial, bg-conic
bg-[--brand]bg-(--brand)Parentheses for CSS variables
grid-cols-[max-content,auto]grid-cols-[max-content_auto]Commas no longer become spaces
!flexflex!Important goes at the end
first:*:pt-0*:first:pt-0Variants now read left to right
tw-flex (prefix)tw:flexSet with @import "tailwindcss" prefix(tw);
focus:transform-nonefocus:scale-noneTransforms use individual CSS properties
theme(screens.xl)theme(--breakpoint-xl) or var(--breakpoint-xl)theme() is deprecated

The full list lives in the official Tailwind upgrade guide, which is worth keeping open while you review the diff.

Default style changes that cause visual bugs

Renamed classes fail loudly in review. Changed defaults fail quietly, because the class names stay the same and only the look changes. These are the ones I check on every migration:

  • Border and divide color changed from gray-200 to currentColor. A plain border on dark text now draws a dark line. Add an explicit color like border-gray-200.
  • Ring changed from 3px blue-500 to 1px currentColor. Use ring-3 ring-blue-500 for the old focus ring.
  • Placeholder text now uses the current text color at 50% opacity instead of gray-400.
  • Buttons now use cursor: default instead of a pointer.
  • Dialogs have their margins reset, so add margin: auto if you relied on centered dialogs.
  • The hidden attribute now wins over display classes such as flex or block.
  • space-y-* and divide-y-* now use a :not(:last-child) selector, which can change spacing on inline elements. Flex or grid with gap is the safer replacement.
  • hover: only applies on devices whose primary input supports hover, so tap-to-reveal patterns on phones stop working.
  • transition and transition-colors now include outline-color, which can animate focus outlines unexpectedly.
  • Gradients: a variant no longer resets the whole gradient, so use via-none to remove a middle stop in dark mode.
  • container: the center and padding options are gone; customize it with @utility container.

If you need a large site to look exactly like v3 while you clean up, the upgrade guide gives compatibility snippets. Use them as a temporary bridge, not a permanent setup:

@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentColor);
  }

  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }
}

@custom-variant hover (&:hover);

Common Tailwind v4 migration errors and fixes

Error or symptomCauseFix
"It looks like you're trying to use tailwindcss directly as a PostCSS plugin"The PostCSS plugin moved to its own packageInstall @tailwindcss/postcss and use it as the plugin name in your PostCSS config
"Cannot apply unknown utility class"@apply inside a Vue, Svelte or Astro <style> block or a CSS module that cannot see your themeAdd @reference "../app.css"; at the top, or use var(--color-blue-500) directly
Some classes have no styles in productionThe files are in .gitignore or node_modules, or class names are built from stringsAdd the folder with @source, safelist with @source inline(), and write full class names
Custom classes ignore hover: and md:They are defined inside @layer utilitiesMove them to @utility
Config changes have no effecttailwind.config.js is no longer detectedLoad it with @config, or move the tokens into @theme
Sass build breaks after upgradingv4 is not designed for Sass, Less or StylusUse plain CSS files; Tailwind handles imports, nesting and variables
Script calling resolveConfig crashesThe function was removedRead tokens with getComputedStyle(document.documentElement).getPropertyValue("--shadow-xl")
Borders look darker, focus rings look thinNew currentColor and 1px defaultsAdd explicit colors and ring-3, or use the compatibility snippet above
Upgrade tool fails to startNode.js older than version 20Update Node.js, then run it again on a clean branch

Vue, Svelte and CSS module styles are processed separately from your main stylesheet, so Tailwind runs once per file. The Tailwind docs recommend keeping styling in utility classes where possible and using @reference only where you really need @apply.

Who should wait before upgrading to Tailwind v4

v4 is stable and mature, but there are good reasons to hold off on an existing project:

Person checking stats on a smartwatch, letting real usage data guide upgrade timing
Let real browser data decide your upgrade timing. Photo: rawpixel, CC0
  • Sites that must support older browsers. Core features depend on @property and color-mix(). v4.1 added fallbacks that help older Safari and Firefox, but the official target is still Safari 16.4+, Chrome 111+ and Firefox 128+. Enterprise intranets, kiosks and old embedded webviews are where I still find older engines.
  • Projects built around Sass, Less or Stylus. You will need to move those files to plain CSS first.
  • Large design systems with many custom JavaScript plugins. Upgrade the engine with @config first, then migrate tokens to @theme over several releases.
  • Stable sites that rarely change. There is little benefit in touching a working build. Upgrade the next time you do significant front-end work.
  • Teams in the middle of a launch. Do the migration in a quiet sprint with time for visual review.
Check your analytics before you check your codebase. If a meaningful share of paying customers use browsers older than Safari 16.4, the upgrade can wait no matter how fast the new engine is.

Everyone else, especially new projects, should be on v4. There is no reason to start a project on v3 in 2026, and the CSS-first setup is simpler to learn. When I build sites as part of my web design service, new builds start on the latest Tailwind v4 release, and for larger apps through my custom web development service I plan migrations like this one with screenshot tests from the start.

Which new v4 features are worth using after you migrate

Once the upgrade is done, a few features replace custom CSS in most projects:

  • Container queries in core: mark a parent with @container and use @sm:, @lg: or @max-md: on children. Since v4.3, @container-size also enables height-based units like cqb.
  • Dynamic values: grid-cols-15, w-17 or data-current:opacity-100 work without configuration or square brackets, because spacing is calculated from a single --spacing variable.
  • 3D transforms: rotate-x-*, rotate-y-*, perspective-* and transform-3d.
  • Gradients: bg-linear-45, bg-radial and bg-conic with interpolation modifiers such as /oklch.
  • Enter transitions: the starting: variant uses @starting-style, though browser support is still limited.
  • v4.1 extras: text-shadow-*, mask-*, colored drop shadows and user-invalid: for friendlier form validation.
  • v4.3 extras: scrollbar-thin, scrollbar-thumb-*, scrollbar-gutter-stable, zoom-* and tab-*.

If you maintain a component library, my guide to building a design system with React and Storybook shows how tokens like these feed into shared components. For layout, my guides to CSS subgrid and view transitions and anchor positioning pair well with v4.

Frequently asked questions

What is the latest version of Tailwind CSS?

As of November 14, 2026, the latest version of Tailwind CSS is v4.3.5, released on November 6, 2026. The last feature release was v4.3 on May 8, 2026. Version 3 is still published on the v3-lts npm tag, where the latest release is 3.4.19 from December 10, 2025.

What is the difference between Tailwind v3 and v4?

Tailwind v4 is a rewrite with a faster engine, configuration in CSS through @theme instead of tailwind.config.js, automatic content detection, native cascade layers and a single @import "tailwindcss"; entry. It also renamed several utilities, changed border and ring defaults to currentColor, moved build integrations into separate packages and requires Safari 16.4+, Chrome 111+ and Firefox 128+.

How do I migrate from Tailwind CSS 3 to 4?

Create a branch, make sure you run Node.js 20 or higher and run npx @tailwindcss/upgrade. The tool updates dependencies, migrates your config to CSS and rewrites renamed classes. Then switch to @tailwindcss/vite or @tailwindcss/postcss, add @reference to component style blocks that use @apply, search for dynamic class names and compare every key page visually.

Where is the Tailwind v4 config file?

There is no separate config file by default. The Tailwind v4 config lives in your main CSS file: @import "tailwindcss"; followed by an @theme block with variables such as --color-brand-500 or --breakpoint-3xl. Custom utilities use @utility, custom variants use @custom-variant and plugins use @plugin.

Can I still use tailwind.config.js in Tailwind v4?

Yes, for compatibility. JavaScript config files are no longer detected automatically, so load yours with @config "../../tailwind.config.js"; in your CSS. The corePlugins, safelist and separator options are not supported, and resolveConfig was removed.

How do layers work in Tailwind v4?

Tailwind v4 uses native CSS cascade layers in the order theme, base, components, utilities. @layer base and @layer components still work for your own styles, but classes inside @layer utilities are no longer registered as utilities. Define custom utilities with @utility so they work with variants like hover: and md:.

Is Tailwind 4 backward compatible with Tailwind 3?

Mostly, but not fully. Most class names are unchanged, but scales such as shadow-sm, blur-sm and rounded-sm moved to -xs, outline-none became outline-hidden, bare ring is now 1px, and deprecated opacity utilities were removed. The upgrade tool handles most of this, but you should still review pages visually.

How long does a Tailwind upgrade take?

For a typical business site or mid-size app, plan for a few hours to a day. The upgrade tool rewrites code in minutes; the rest of the time goes into dynamic class names, component style blocks and visual checks. Large design systems with custom plugins are best migrated in stages with @config.

Next steps

Tailwind v4 is fast, stable and now well past its first year, with v4.3.5 as the current release. For new work it is the obvious choice. For existing v3 projects, confirm your browser data, run the upgrade tool in a branch, fix the changed defaults and budget time for visual review.

If you would rather have someone handle the migration or a front-end rebuild, get in touch through my contact form or browse my web development case studies.

Sources

Related reading