web-styling-tailwind
Installation
SKILL.md
Tailwind CSS v4+ Patterns
Quick Guide: v4 is configured in CSS, not JavaScript:
@import "tailwindcss"replaces the three@tailwinddirectives, and@themereplacestailwind.config.js— each variable in it generates utility classes and a real CSS custom property. Custom utilities come from@utilityand custom variants from@custom-variant; the v3 plugin API and@layer utilitiesno longer reach the variant system. Source files are detected automatically, so there is nocontentarray. Several defaults moved: borders arecurrentColor,ringis 1px, the shadow and radius scales shifted one step, and the important modifier trails (flex!).
Detailed Resources:
- examples/core.md — setup and source detection, responsive design, the three dark-mode strategies, state variants,
@themecustomisation - examples/advanced.md —
@utility,@custom-variant, container queries, 3D transforms,@starting-style, masks, class composition - reference.md —
@themenamespace table, v3-to-v4 differences, renamed utilities, browser support
Which path applies
- A new project — install the package for your bundler, add
@import "tailwindcss", and put every token in@theme. Start at examples/core.md. - A v3 project being upgraded — run
npx @tailwindcss/upgradefirst; it converts the config, the directives and most renamed utilities. The tables in reference.md cover what it leaves, and custom plugins have to become@utilityand@custom-variantby hand — see examples/advanced.md.