Title
Extended description
--- name: tailwindcss description: >- Utility-first CSS styling with Tailwind CSS v4. Use when styling components, configuring themes, responsive design, or building design systems. Triggers on Tailwind, CSS, styling, theming, or responsive design questions. --- # Tailwind CSS v4 Tailwind CSS v4 introduces CSS-first configuration, OKLCH colors, and improved performance. This skill provides comprehensive patterns for building modern UIs. ## Core Concepts ### CSS-First Configuration Tailwind v4 uses CSS variables and `@theme` directive instead of `tailwind.config.js`: ```css /* app.css */ @import 'tailwindcss'; @theme { /* Colors using OKLCH for better perceptual uniformity */ --color-primary-50: oklch(0.97 0.01 250); --color-primary-100: oklch(0.93 0.03 250); --color-primary-500: oklch(0.55 0.2 250); --color-primary-900: oklch(0.25 0.1 250); /* Typography */ --font-family-sans: 'Inter', system-ui, sans-serif; --font-family-mono: 'JetBrains Mono', monospace; /* Spacing scale */ --spacing-18: 4.5rem; --spacing-128: 32rem; /* Border radius */ --radius-xl: 1rem; --radius-2xl: 1.5rem; /* Shadows */ --shadow-soft: 0 2px 15px -3px oklch(0 0 0 / 0.1); /* Animations */ --animate-fade-in: fade-in 0.3s ease-out; } @keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } ``` ### New Variant Syntax ```html
Card description text
Extended description