This is a comprehensive guide for Tailwind CSS v4 that does one thing really well: it enforces design token usage so your theme switching actually works. Pedro Nauck built this around practical rules like breaking long class strings into arrays, using bg-background instead of bg-white, and embracing mobile-first responsive patterns. It includes a validation checklist and covers v4-specific utilities like size-10 and h-dvh. The anti-patterns section is honest about what not to do, like avoiding @apply and never constructing classes dynamically. If you're building components with Tailwind and want consistent, theme-aware styling without the usual pitfalls, this gives you the patterns and guardrails to do it right.

skills.sh installs
481
GitHub stars
655
last updated
Aug 21, 2026

Install

$ npx -y skills add pedronauck/skills --skill tailwindcss --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

Sponsors

Details

Repository
github.com/pedronauck/skills
Categories
Frontend Development, Documentation, Mobile Development, Design & UI/UX
First seen
Jun 3, 2026

More from pedronauck/skills

All 70
1jezweb avatartiptapjezweb/claude-skillsBuild rich text editors with Tiptap - headless editor framework with React and Tailwind v4. Covers SSR-safe setup, image uploads, prose styling, and collaborati478skills.sh installs
2inertia-rails avatarinertia-rails-typescriptinertia-rails/skillsTypeScript type safety for Inertia Rails (React, Vue, Svelte): shared props, flash, and errors via InertiaConfig module augmentation in globals.d.ts. Use when s476skills.sh installs
3bobmatnyc avatarsveltekitbobmatnyc/claude-mpm-skillsSvelteKit - Full-stack Svelte framework with file-based routing, SSR/SSG, form actions, and adapters for deployment460skills.sh installs
4sonofmagic avatarweapp-tailwindcsssonofmagic/skills协调 weapp-tailwindcss 相关任务并提供当前安全基线。Use when 用户泛化地询问 weapp-tailwindcss、Tailwind CSS in mini-programs、mini app styling,或尚未明确是接入、迁移、排障、运行时、自定义构建还是 React Native;具体任459skills.sh installs
5mohtashammurshid avatargetdesignmohtashammurshid/getdesignTurn any public URL into a production-grade 9-section design.md spec (colors, typography, components, layout, depth, motion, responsive, prompt guide) using the452skills.sh installs
6hoodini avatarfigmahoodini/ai-agents-skillsIntegrate with Figma API for design automation and code generation. Use when extracting design tokens, generating React/CSS code from Figma components, syncing 451skills.sh installs