Skill / UI / Tailwind
Tailwind v4 migration syntax
Use v4 names and modifiers when replacing or reviewing v3-era Tailwind classes.
Goal
Avoid silent visual regressions from v3 names that still compile but mean something different in Tailwind v4.
Styling rules for Tailwind v4, token discipline, component reuse, and className boundaries.
Checks
1Use v4 scale names such as `shadow-xs`, `drop-shadow-xs`, `blur-xs`, `rounded-xs`, `outline-hidden`, and explicit `ring-3` where the old default mattered.
2Use slash opacity and v4 gradient names: `bg-black/50`, `text-white/50`, and `bg-linear-to-r`.
3Use trailing important syntax such as `bg-red-500!`, plus `shrink-*` and `grow-*` instead of `flex-shrink-*` and `flex-grow-*`.
4Use v4 CSS-variable shorthand and type hints: `bg-(--row-bg)`, `text-(color:--fg)`, and `text-(length:--size)`.
5Use underscores inside arbitrary list values, such as `grid-cols-[max-content_auto]`.
Avoid
1Keeping old classes such as `bg-opacity-*`, `text-opacity-*`, `bg-gradient-to-*`, prefix important utilities, `bg-[--var]`, or comma-separated arbitrary grid values.
2Assuming a bare v3 size still has the same rendered weight, radius, shadow, blur, ring, or outline behavior in v4.
Source
Imported as local Refined UI skill guidance, with this repo owning the final wording.
Mastra tailwind-v4
../mastra/.claude/skills/tailwind-v4