Tailwind CSS v4 patterns for @theme config, v3-to-v4 changes, and variants. Load before any edit to a class list, stylesheet, or tailwind.config.*, however small, and for Tailwind questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Tailwind Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-tailwind-patterns)
---
name: tailwind-patterns
description: Tailwind CSS v4 patterns for @theme config, v3-to-v4 changes, and variants. Load before any edit to a class list, stylesheet, or tailwind.config.*, however small, and for Tailwind questions.
---
# Tailwind patterns
Default assumption: Tailwind CSS 4.3, per the Tailwind CSS changelog.
A row applies when the `tailwindcss` version in the project's `package.json` and lockfile is at least its version. 3.4 is tagged `v3-lts` on npm. Without a version to read:
- `@tailwindcss/postcss`, `@tailwindcss/vite`, or `@tailwindcss/cli` in `package.json`, or `@import "tailwindcss"` in CSS: v4.
- A `tailwind.config.js` or `.ts` and no v4 sign: v3, and only the rows below 4.0 apply.
- Both: mid-migration. Treat it as v4 and expect leftover v3 patterns.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing a class list or stylesheet, or moving a project from v3 to v4 | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing a class list or stylesheet | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing `@theme`, reading a theme value in CSS, or adding a variant or a plugin | [reference/practices.md](reference/practices.md) |
| Configuring Prettier, ESLint, or the editor extension for Tailwind, or the upgrade tool | [reference/tooling.md](reference/tooling.md) |