Sub topic 8
Check browser support
Tailwind CSS v4 targets modern browsers only. Check this before you install it, because a browser that lacks one of its required CSS features will render some utilities wrongly. This chapter assumes you have a Vite project and know basic CSS, including custom properties (variables). It lists the supported versions, explains why those versions are required, and shows how to decide whether v4 fits your audience.
The supported browsers
Tailwind v4 targets these minimum versions:
| Browser | Minimum version |
|---|---|
| Safari (macOS and iOS) | 16.4 |
| Chrome (and other Chromium browsers) | 111 |
| Firefox | 128 |
Chromium-based browsers such as Edge, Opera, and Brave follow the Chrome engine version. Edge 111 or later is equivalent to Chrome 111 or later.
These versions are the targets of the framework. Tailwind v4 does not downlevel its output (rewrite it for older engines) to reach older browsers. Do not assume that installing a polyfill or setting a Browserslist query will make the generated CSS work in an older browser.
If you must support older browsers, use Tailwind v3.4, which has a wider support range. Do not try to patch v4.
Why these versions
The minimums come from CSS features that v4 uses in its generated stylesheet. Three matter most.
- Cascade layers (
@layer). Tailwind puts its output into named layers such astheme,base,components, andutilities. Layers let the browser order styles by layer rather than by source order or specificity. Your own unlayered CSS therefore beats Tailwind utilities by default. - Registered custom properties (
@property). Utilities that compose several effects use internal variables. Examples are gradients, shadows, rings, and transforms.@propertylets Tailwind give these variables a type and an initial value, so a utility that reads an unset variable still gets a sane default. color-mix(). Opacity modifiers likebg-blue-500/50mix a color with transparency throughcolor-mix(). This lets the modifier work even when the color is a CSS variable from your theme.
The default color palette also uses the oklch() color space. That space is widely available in the browsers listed above.
The following table shows where each feature became available in each engine. The tightest limit decides the minimum version.
| Feature | Chrome | Safari | Firefox |
|---|---|---|---|
| `@layer` | 99 | 15.4 | 97 |
| `@property` | 85 | 16.4 | 128 |
| `color-mix()` | 111 | 16.2 | 113 |
Safari 16.4 is the release that adds @property, which sets the Safari floor. Chrome 111 is the release that adds color-mix(). Firefox 128 is the release that adds @property. These three constraints give the version table above. You can confirm each row on caniuse.com or MDN before you commit to a design decision.
What fails in an unsupported browser
The failure is usually partial, not total. Plain utilities such as p-4, text-center, or flex use ordinary CSS and often work. The damage shows up in utilities that depend on the newer features:
- Gradients, shadows, rings, and transforms may render without the intended values if the browser ignores
@propertydefaults. - Opacity modifiers on colors may be dropped, so
bg-black/50can render as no background or as a solid color. - Layer ordering may differ, so your own CSS and Tailwind's CSS can override each other in unexpected ways.
Partial failure makes this hard to debug. The page loads, most things look right, and a few elements look subtly wrong in one browser. If a bug appears only in one browser, check its version against the table before you search your code.
Check your real audience
Decide with data, not with the browser list alone. Follow these steps.
- Check your analytics for the browser and version share of your visitors. A tool such as Google Analytics, Plausible, or your server logs works.
- Compare the share of visitors below the minimums (Safari below 16.4, Chrome below 111, Firefox below 128) with what your project tolerates.
- For an internal tool, check what your organization requires. Managed devices often run recent browsers, but some locked-down environments do not.
- Look at older iOS devices. Safari on iOS is tied to the operating system version, and some older iPhones and iPads cannot update past an iOS release that predates 16.4. Visitors on those devices stay on an older Safari, whatever they prefer.
The iOS point matters most for consumer sites. A visitor on Chrome can update the browser. A visitor on an old iPad often cannot.
Test the features in the browser
You can ask a browser directly whether it supports the features Tailwind relies on. CSS.supports() returns true or false for a property, value, or condition. The following script reports the status of all three features. Save it as src/support-check.js and import it from your entry file during development.
const checks = {
"@property": typeof CSS !== "undefined" && "registerProperty" in CSS,
"color-mix()": CSS.supports("color", "color-mix(in srgb, red 50%, blue)"),
"oklch()": CSS.supports("color", "oklch(0.6 0.2 250)"),
"@layer": typeof CSSLayerBlockRule !== "undefined",
}
const missing = Object.entries(checks)
.filter(([, supported]) => !supported)
.map(([name]) => name)
if (missing.length > 0) {
console.warn(
`This browser lacks features Tailwind v4 relies on: ${missing.join(", ")}`
)
} else {
console.info("All Tailwind v4 baseline features are supported.")
}The script checks CSS.registerProperty as a proxy for @property support. The JavaScript API shipped alongside the CSS at-rule in the engines in the table, and it is the simplest check from script. The @layer check looks for the CSSLayerBlockRule interface. Each check reads from the browser, so the result reflects the browser that runs it, not the one you build with.
Treat this script as a development diagnostic. Do not ship it as a way to repair a failure, because by the time it runs, the page has already used the CSS.
Vite's own browser targets
Vite has its own build target setting, which controls how it transforms your JavaScript and CSS for production. Its default target is also modern, but it is a separate setting from Tailwind's requirements. Changing build.target in vite.config.ts to something older does not make Tailwind's @property or color-mix() output work in older browsers. Vite can lower some syntax, but it cannot supply a CSS feature the browser lacks.
Check the Vite documentation for the target defaults of the Vite version you installed. These defaults change between major versions of Vite.
Decision criteria
Use this guide to choose between v4 and v3.4.
| Situation | Recommendation |
|---|---|
| New project, audience on current browsers | Tailwind v4 with the Vite plugin |
| Analytics show a meaningful share below the minimums | Stay on v3.4, or raise your minimum support |
| Internal tool on managed, current browsers | Tailwind v4 |
| Public site with old iPads or iPhones in the audience | Test on a real device before you commit |
| Unknown audience | Check analytics first, then decide |
The cost of choosing wrongly is uneven. Starting on v4 and later finding that you need older browsers means a downgrade, with changes to the setup and the config. Starting on v3.4 and later upgrading is a planned migration that you can do when you are ready.
Summary
- Tailwind v4 targets Safari 16.4+, Chrome 111+, and Firefox 128+.
- The minimums come from
@property,color-mix(), and@layer. - Failures in older browsers are partial and can be subtle.
- Vite's
build.targetand Browserslist do not change these requirements. - If you need older browsers, use Tailwind v3.4.
Exercise
A teammate reports that on an iPad running Safari 15, a page that uses bg-linear-to-r from-blue-500 to-purple-500 and bg-black/50 looks wrong, while text and spacing utilities look fine. Explain the likely cause, say why lowering Vite's build.target will not fix it, and name two options.
Show answer
Safari 15 is below Tailwind v4's minimum of Safari 16.4. It lacks @property support, so the gradient utilities that depend on registered custom properties lose their defaults. Older Safari 15 releases may also lack color-mix(), which the /50 opacity modifier uses, so the background can render incorrectly. Plain utilities such as spacing and text use ordinary CSS, so they still work. Lowering build.target only changes how Vite transforms JavaScript and CSS syntax, and it cannot add support for CSS features that the browser's engine does not have. Two options are to raise the minimum supported browser (and tell users to update, or stop supporting that iPad), or to use Tailwind v3.4, which supports older browsers.