skills/tailwind-v4-configuration/SKILL.md
Configure Tailwind CSS v4 with CSS-first approach. Use when installing, migrating from v3, setting up build tools (Vite/PostCSS/CLI), customizing themes with @theme, or configuring plugins.
npx skillsauth add Chris-Maskey/opencode-config tailwind-v4-configurationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A complete guide to configuring Tailwind CSS v4 with its new CSS-first approach, unified toolchain, and modern feature set.
@theme directive| Aspect | v3 | v4 |
| ------------------ | --------------------------------- | ----------------------------------------------- |
| Configuration | tailwind.config.js (JavaScript) | @theme block in CSS |
| Import | Three @tailwind directives | Single @import "tailwindcss" |
| Content paths | Explicit content array | Automatic detection (respects .gitignore) |
| Build pipeline | Requires PostCSS + plugins | Integrated Lightning CSS (all-in-one) |
| Performance | Fast | 10x faster (Oxide engine) |
| Colors | hex, rgb, hsl | Native oklch() + modern color spaces |
| Variants | outline-none removed outline | outline-hidden + proper outline-none |
| Shadows | shadow-sm (smallest) | shadow-xs (smallest), shadow-md (default) |
| Border radius | rounded-sm (smallest) | rounded-xs (smallest), rounded-md (default) |
All configuration now lives in your CSS file using the @theme directive:
@import "tailwindcss";
@theme {
--color-brand-primary: oklch(0.65 0.24 354.31);
--font-display: "Satoshi", "sans-serif";
--breakpoint-3xl: 1920px;
}
v4 automatically discovers templates - no configuration needed for most projects.
shadow-sm (v3) → shadow-xs (v4)rounded-sm (v3) → rounded-xs (v4)bg-gradient-to-r (v3) → bg-linear-to-r (v4)This skill provides detailed examples through context files. Load them when needed:
| Context File | When to Load |
| ----------------------------------------------- | -------------------------------------------------- |
| context/setup-examples.md | Setting up installation, CSS config, custom utils |
| context/migration-guide.md | Migrating from v3 to v4 |
| context/framework-examples.md | Setting up Next.js, React, Vue, SvelteKit |
| context/advanced-config.md | Multi-stylesheets, theming, animations |
@import "tailwindcss" with a single import@theme block@theme for dynamic theming@utility for custom utilities (not @apply for components)@custom-variant for reusable variant logictailwind.config.js file (use CSS @theme instead)@tailwind base/components/utilities separatelycontent paths unless you have a specific needbg-opacity-50 (use /50 instead)autoprefixer or postcss-importTailwind CSS v4 targets modern browsers:
Need to install Tailwind v4?
├─ New project? → Use Vite plugin (recommended)
├─ Existing project? → Use PostCSS plugin
└─ Static site? → Use CLI
Migrating from v3?
└─ Run: npx @tailwindcss/upgrade
Need custom utilities?
└─ Use @utility directive in CSS
Need framework setup?
└─ See context/framework-examples.md
tools
Anti-patterns and mistakes to avoid as a product manager. Use when evaluating leadership behaviors, improving team dynamics, reflecting on management practices, or onboarding new product managers.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
testing
Design effective CTAs using visual attention and gaze psychology principles. Use when designing landing pages, button hierarchies, conversion elements, or optimizing user attention flow through interfaces.
tools
Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.