tailwind

Replace hardcoded colors and inline styles with Tailwind v4 semantic tokens.

70|14|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/holger1411/astrodeck --skill tailwind-holger1411
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind
Source: https://github.com/holger1411/astrodeck/tree/main/.claude/skills/tailwind
Command: npx skills add https://github.com/holger1411/astrodeck --skill tailwind-holger1411

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tailwind CSS and design-token management often suffer from hardcoded colors and inline styles that break consistency across components and themes. This Skill guides writers and reviewers to replace hard-coded colors and inline styles with semantic tokens and theme-driven utilities.

Core Features & Use Cases

  • Enforces token-based color usage via OKLCH-aware CSS variables and @theme tokens.
  • Advises against hardcoded color values and inline styles, promoting consistent theming across light/dark modes.
  • Provides best-practices for updating globals.css and when to consult the design system docs.

Quick Start

Audit your codebase for hardcoded colors and inline styles and replace them with theme tokens and OKLCH-based colors.

Frequently Asked Questions about tailwind

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

FAQPage Schema
How do I remove hardcoded colors and inline styles in Tailwind v4?

To remove hardcoded colors and inline styles in Tailwind v4, replace them with semantic tokens defined via OKLCH-aware CSS variables and @theme tokens. This enforces design consistency by shifting color management to theme-driven utilities instead of direct values.

What is the best way to handle dark mode with Tailwind CSS tokens?

The best way to handle dark mode with Tailwind CSS tokens is to use semantic tokens. By defining OKLCH color variables in your @theme configuration, light and dark modes switch automatically through theme token references rather than hardcoded conditional classes.

Does Tailwind v4 require a tailwind.config.mjs file for color theming?

Tailwind v4 does not require a tailwind.config.mjs file for color theming. You can configure design tokens entirely through CSS using the @theme directive, enabling OKLCH color usage and semantic token constraints without JavaScript configuration files.

Why should I use OKLCH colors instead of hex values in a frontend design system?

You should use OKLCH colors instead of hex values in a frontend design system to maintain perceptual uniformity across light and dark modes. OKLCH-aware CSS variables ensure consistent visual brightness and saturation transitions when switching between theme tokens.

When do I need to update globals.css for Tailwind CSS design tokens?

You need to update globals.css for Tailwind CSS design tokens when auditing your codebase to replace hardcoded colors and inline styles. Centralizing OKLCH-based semantic tokens in globals.css ensures theme-driven utilities apply consistent styling across all components.