tailwind-v4

Enforce token-first Tailwind CSS v4 styling and ban literal pixel arbitraries.

11|2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/recca0120/code-quest --skill tailwind-v4-recca0120
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4
Source: https://github.com/recca0120/code-quest/tree/main/.claude/skills/tailwind-v4
Command: npx skills add https://github.com/recca0120/code-quest --skill tailwind-v4-recca0120

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents inconsistent UI styling by enforcing a token-first workflow in Tailwind CSS v4, reducing pixel-level drift and fragile arbitrary values across the codebase.

Core Features & Use Cases

  • Token-first design flow: Recommends checking existing @theme tokens before using arbitrary values, and extending @theme when the design exceeds current token ranges.
  • Controlled customization: Uses @utility and @custom-variant (e.g., dark mode) to create reusable, consistent styling behaviors instead of ad-hoc class strings.
  • Project-safe constraints: Enforces a rule that literal pixel arbitraries like text-[13px] are banned, aligning component typography, spacing, and visual density with the project’s axis system.

Quick Start

Apply Tailwind v4 by starting from existing @theme tokens in App.css, creating new tokens in @theme only when needed, and otherwise using semantic utilities or @utility for reusable effects.

Frequently Asked Questions about tailwind-v4

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent design tokens in Tailwind CSS v4?

To enforce consistent design tokens in Tailwind CSS v4, adopt a token-first workflow using the @theme directive to define scales before applying utilities, preventing pixel-level drift across your UI components.

What's the best way to ban literal pixel arbitraries in Tailwind v4?

Banning literal pixel arbitraries like text-[13px] in Tailwind v4 requires enforcing project-safe constraints that align typography and spacing with your project’s rem-based axis system instead of ad-hoc values.

How do I create custom utilities and dark mode variants in Tailwind v4?

Creating custom utilities and dark mode variants in Tailwind v4 involves using the @utility and @custom-variant directives to build reusable, consistent styling behaviors instead of fragile ad-hoc class strings.

Does Tailwind CSS v4 require specific directives for theme authoring?

Tailwind CSS v4 theme authoring requires correct directive usage including @import "tailwindcss", @theme, @utility, and @custom-variant to properly standardize styling and manage design tokens.

When do I need to extend @theme tokens in a Tailwind v4 React project?

You need to extend @theme tokens in a Tailwind v4 React project when your component design exceeds current token ranges, ensuring you check existing tokens before falling back to arbitrary values.

Why does my Tailwind CSS v4 UI styling look inconsistent across components?

Inconsistent Tailwind CSS v4 UI styling often results from pixel-level drift caused by unsafe arbitrary values, which you can resolve by standardizing on a token-first workflow with semantic utilities.