tailwind-4

Tailwind CSS 4.1+ patterns. Use when styling components, responsive design, container queries, masks, shadows, or animations. (project)

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 30, 2025

When & Why to Use This Skill

This Claude skill provides comprehensive patterns and best practices for Tailwind CSS 4.1+, enabling agents to generate modern, high-performance styles. It focuses on the transition to CSS-first configurations, utilizing the latest features like container queries, advanced variants, and semantic tokens for responsive and accessible web design.

Use Cases

  • Modernizing legacy Tailwind CSS projects by migrating from tailwind.config.js to the new @theme directive for better performance and maintainability.
  • Implementing complex UI components with native container queries (@container) and advanced state variants like in-* and has-* for more modular layouts.
  • Designing sophisticated visual effects including entry animations with the starting: variant and advanced CSS masks without writing custom boilerplate.
  • Developing scalable dark mode systems using semantic tokens and root-level CSS variables instead of repetitive per-element utility classes.
nametailwind-4
descriptionTailwind CSS 4.1+ patterns. Use when styling components, responsive design, container queries, masks, shadows, or animations. (project)

Tailwind 4.1+

Setup

@import "tailwindcss";

Required Reading

Before writing any @theme or @utility → READ utilities.md and examples/*.css

Avoid → Use

  • tailwind.config.js → @theme in CSS
  • @apply → @utility or raw CSS
  • dark:bg-* per element → semantic tokens (see patterns.md)
  • group class → in-* variant (see variants.md)

Patterns

  • Dark mode: :root/.dark + @theme inline → patterns.md
  • Variants: in-*, has-*, nth-*, negation → variants.md
  • Container queries: @container, @sm:, @md: → variants.md
  • Entry animation: starting: variant → patterns.md
  • Masks: mask-b-from-*, mask-radial-* → patterns.md