madappgang/claude-code/tailwindcss
- community
Checking that the SKILL.md file is still in the repository.
TailwindCSS v4 patterns with CSS-first configuration using @theme, @source, and modern CSS features. Covers design tokens, CSS variables, container queries, dark mode, and Vite integration. Use when configuring Tailwind, defining design tokens, or leveraging modern CSS with Tailwind utilities.
Install
npx vskill@latest install madappgang/claude-code/tailwindcssSKILL.md
TailwindCSS v4 Patterns
Overview
TailwindCSS v4 introduces a CSS-first approach, eliminating the need for JavaScript configuration files. All customization happens directly in CSS using new directives.
Key Changes from v3 to v4
| Feature | v3 | v4 | |
|---|---|---|---|
| Configuration | tailwind.config.js | CSS @theme directive | |
| Content detection | JS array | @source directive | |
| Plugin loading | require() in JS | @plugin directive | |
| Custom variants | JS API | @custom-variant directive | |
| Custom utilities | JS API | @utility directive |
Browser Support
TailwindCSS v4 requires modern browsers:
- Safari 16.4+
- Chrome 111+
- Firefox 128+
Important: No CSS preprocessors (Sass/Less) needed - Tailwind IS the preprocessor.
Documentation Index
Core Documentation
| Topic | URL | Description | |
|---|---|---|---|
| Installation | https://tailwindcss.com/docs/installation | Setup guides by framework | |
| Using Vite | https://tailwindcss.com/docs/installation/vite | Vite integration (recommended) | |
| Editor Setup | https://tailwindcss.com/docs/editor-setup | VS Code IntelliSense | |
| Upgrade Guide | https://tailwindcss.com/docs/upgrade-guide | v3 to v4 migration | |
| Browser Support | https://tailwindcss.com/docs/browser-support | Compatibility requirements |
Configuration Reference
| Directive | URL | Description | |
|---|---|---|---|
| @theme | https://tailwindcss.com/docs/theme | Define design tokens | |
| @source | https://tailwindcss.com/docs/content-configuration | Content detection | |
| @import | https://tailwindcss.com/docs/import | Import Tailwind layers | |
| @config | https://tailwindcss.com/docs/configuration | Legacy JS config |
CSS Features
| Feature | URL | Description | |
|---|---|---|---|
| Dark Mode | https://tailwindcss.com/docs/dark-mode | Dark mode strategies | |
| Responsive Design | https://tailwindcss.com/docs/responsive-design | Breakpoint utilities | |
| Hover & Focus | https://tailwindcss.com/docs/hover-focus-and-other-states | State variants | |
| Container Queries | https://tailwindcss.com/docs/container-queries | Component-responsive design |
Customization
| Topic | URL | Description | |
|---|---|---|---|
| Theme Configuration | https://tailwindcss.com/docs/theme | Token customization | |
| Adding Custom Styles | https://tailwindcss.com/docs/adding-custom-styles | Extending Tailwind | |
| Functions & Directives | https://tailwindcss.com/docs/functions-and-directives | CSS functions | |
| Plugins | https://tailwindcss.com/docs/plugins | Plugin system |
CSS-First Configuration
Basic Setup
This single import replaces the v3 directives (@tailwind base, @tailwind components, @tailwind utilities).
@theme Directive - Design Tokens
The @theme directive defines design tokens as CSS custom properties:
Generated utilities from above:
- Colors:
bg-primary,text-primary-dark,border-accent - Fonts:
font-display,font-body,font-mono - Animations:
ease-spring,duration-fast
@theme inline Pattern
Use @theme inline to reference existing CSS variables without generating new utilities:
When to use `@theme inline`:
- Theming with CSS variables (light/dark mode)
- Shadcn/ui integration
- Dynamic theme switching
@source Directive - Content Detection
@custom-variant - Custom Variants
@utility - Custom Utilities
@plugin - Plugin Configuration
@config - Legacy JS Configuration
When you need JS configuration (rare in v4):
Vite Integration
Installation
Vite Configuration
CSS Entry Point
TypeScript Path Aliases
Modern CSS Features with Tailwind v4
Native CSS Variables
Tailwind v4 uses native CSS variables without wrapper functions:
oklch Color Format
Benefits of oklch:
- Perceptually uniform
- Consistent lightness across hues
- Better for generating color scales
- Native browser support
Container Queries
:has() Pseudo-Class
Native CSS Nesting
Utility Patterns
Responsive Design (Mobile-First)
State Variants
Dark Mode
Strategy 1: Class-based (recommended)
Strategy 2: Media query
Animation Utilities
Size Utility (v4)
Best Practices
When to Use @apply
Use @apply sparingly for true component abstraction:
Rule: Only extract patterns when reused 3+ times.
Design Token Naming
Performance
- Use Vite plugin - Automatic dead code elimination
- Avoid dynamic class names - Static analysis can't optimize them
- Purge unused styles - Automatic with proper @source config
CSS Layers Order
Tailwind v4 uses CSS cascade layers:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dev/skills/frontend/tailwindcss/SKILL.md
Popularity
- Repository stars
- 277
- Repository forks
- 32
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/madappgang/claude-code/tailwindcss)