# Tailwindcss

> Tailwind CSS v4 conventions — semantic design tokens for theme-safe styling, mobile-first responsive layouts, and v4-first utilities. Use when styling components or writing className utilities with Tailwind. Don't use for plain CSS, CSS-in-JS (styled-components, emotion), or other utility frameworks.

- Skill: `pedronauck/tailwindcss` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add pedronauck/tailwindcss`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pedronauck/tailwindcss/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: pedronauck (https://skillmd.com/u/pedronauck)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/pedronauck/tailwindcss

---

# Tailwind CSS v4

Prefer utilities for component styling. CSS still owns theme tokens, base rules, and styles that utilities do not express clearly. Use the installed Tailwind version and existing design system.

- Use semantic tokens for theme-aware colors, borders, and states. Use names from the project's token source and design documentation; do not assume a universal shadcn vocabulary.
- Keep class names complete and statically discoverable. Use lookup maps instead of interpolated fragments such as `bg-${color}-500`.
- Group long classes for readability; no character-count gate. Use the project's `cn`/merge helper when composing variants or accepting overriding `className` values.
- Resolve specificity through the style design and class merging, avoiding `!important`. Use `@apply` only where the repository permits it.
- Build responsive layouts from content needs, preserve visible keyboard focus, and select supported v4 utilities rather than copying older idioms.
- Validate through the repository's owning gates. Use its existing root/package commands and reuse valid evidence; styling does not add a separate lint/typecheck ritual.

Read `references/patterns.md` for the utility or variant being changed. Its token names are examples; use the actual theme inventory.

