Back to Skills

tailwindcss-v4

verified

Tailwind CSS v4.1 core features, @theme, directives, migration guide

View on GitHub

Marketplace

fusengine-plugins

fusengine/agents

Plugin

fuse-tailwindcss

development

Repository

fusengine/agents

plugins/tailwindcss/skills/tailwindcss-v4/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/fusengine/agents/blob/main/plugins/tailwindcss/skills/tailwindcss-v4/SKILL.md -a claude-code --skill tailwindcss-v4

Installation paths:

Claude
.claude/skills/tailwindcss-v4/
Powered by add-skill CLI

Instructions

# Tailwind CSS v4.1 Core

## Documentation

- [theme.md](../docs/theme.md) - CSS theme variables, design tokens, customization
- [functions-and-directives.md](../docs/functions-and-directives.md) - @utility, @variant, @theme, @apply
- [adding-custom-styles.md](../docs/adding-custom-styles.md) - Custom utilities and variants
- [detecting-classes-in-source-files.md](../docs/detecting-classes-in-source-files.md) - Content detection
- [upgrade-guide.md](../docs/upgrade-guide.md) - Migration from v3 to v4

## Quick Reference - @theme Namespaces

| Namespace | Utilities generees |
|-----------|-------------------|
| `--color-*` | bg-*, text-*, border-*, fill-* |
| `--font-*` | font-* |
| `--text-*` | text-xs, text-sm, text-base, etc. |
| `--spacing-*` | p-*, m-*, gap-*, w-*, h-* |
| `--radius-*` | rounded-* |
| `--shadow-*` | shadow-* |
| `--breakpoint-*` | sm:*, md:*, lg:*, xl:* |
| `--animate-*` | animate-spin, animate-bounce, etc. |
| `--ease-*` | ease-in, ease-out, ease-in-out |

## Configuration CSS-first

### Avant (v3)
```javascript
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: { brand: '#3B82F6' }
    }
  }
}
```

### Apres (v4)
```css
@import "tailwindcss";

@theme {
  --color-brand: #3B82F6;
}
```

## Directives v4

### @utility - Creer une utility
```css
@utility tab-4 {
  tab-size: 4;
}
/* Usage: class="tab-4" */
```

### @variant - Style conditionnel
```css
.card {
  @variant dark {
    background: #1a1a2e;
  }
}
```

### @custom-variant - Nouveau variant
```css
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
/* Usage: dark:bg-gray-900 */
```

## v3 → v4 Breaking Changes

### Removed @tailwind directives

```css
/* v3 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* v4 */
@import "tailwindcss";
```

### Renamed utilities

| v3 | v4 |
|----|-----|
| `shadow-sm` | `shadow-xs` |
| `shadow` | `shadow-sm` |
| `rounded-sm` | `rounded-xs` |
| `rounded` | `rounded-sm` |
| `outline-none` | 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3357 chars