Skip to content
cccskills
FreePublished on GitHub

tailwind

Use when writing or reviewing any CSS class, changing colors, modifying globals.css, or when hardcoded colors or inline styles are detected.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80 stars(GitHub 80 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

  • SKILL.md3.0 KB
  • LEARNINGS.md734 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Tailwind CSS Skill

Canonical Sources

This skill references the following globals — read them BEFORE starting work:

  • system/globals/colors.md — OKLCH palette, token table, color semantics
  • system/globals/effects.md — Border radius, shadows, card pattern

Domain

Tailwind v4 Expertise, @theme Directive, OKLCH, Utilities, Dark Mode

KPIs

MetricTargetMeasurement
Hardcoded Colors0npm run check:kpis
Inline Styles0npm run check:kpis
tailwind.config.mjsmust not existnpm run check:kpis

npm run check:kpis (.claude/scripts/check-kpis.mjs) is the single source of truth for these checks — do not re-implement them with ad-hoc greps. The convention guard hook additionally warns when a change introduces hardcoded colors or inline styles.

Rules

Tailwind v4 Setup

AstroDeck uses Tailwind CSS v4 via @tailwindcss/vite (NOT @astrojs/tailwind).

  • No tailwind.config.mjs — config lives in CSS
  • @theme directive for token registration
  • .dark class for dark mode overrides

@theme vs .dark

/* Token registration (Tailwind recognizes these as utilities) */
@theme {
  --color-primary: oklch(11.2% 0.0079 286.75);
  --color-primary-foreground: oklch(100% 0 0);
}

/* Dark mode overrides (only change values, no new tokens) */
.dark {
  --color-primary: oklch(100% 0 0);
  --color-primary-foreground: oklch(11.41% 0.0079 286.75);
}

Dark Mode Pattern

Do NOT control colors with dark: prefix. Use CSS variables that automatically override in .dark:

<!-- Wrong -->
<div class="bg-white dark:bg-gray-900 text-black dark:text-white">

<!-- Correct -->
<div class="bg-background text-foreground">

Utility Patterns

/* Responsive (mobile-first) */
text-base md:text-lg lg:text-xl

/* Hover/Focus states */
hover:bg-primary/90 focus:ring-2 focus:ring-ring

/* Transitions */
transition-colors duration-200

/* Dark mode (automatic via CSS variables) */
bg-background text-foreground  /* works in both modes */

Non-Negotiable

These rules always apply — even under time pressure, even for "just a quick fix":

  • No hardcoded colors. bg-blue-500 is never "just temporary" — it gets forgotten and breaks on the next theme change.
  • No inline styles. Not even "just for this special case." Tailwind utilities cover everything.
  • OKLCH only. "HSL is more readable" is not an argument — the entire design system is based on OKLCH. Mixing destroys color consistency.
  • No tailwind.config.mjs. Not even "because a package expects it." Config lives in CSS via @theme.
  • No @astrojs/tailwind. AstroDeck uses @tailwindcss/vite. The old integration is incompatible with Tailwind v4.

Before Applying

Read LEARNINGS.md in this directory to avoid known anti-patterns.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use when creating or modifying any UI element visible to the user, reviewing HTML markup, adding interactive elements, or when Lighthouse Accessibility drops below 90.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

astro

Free

Use when creating or modifying .astro/.tsx files, configuring astro.config.mjs, working with Content Collections, or when TypeScript or build errors occur.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

Use when creating or editing pages, blog posts, or content files, adding meta tags, or when Lighthouse SEO drops below 90.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

qa

Free

Use when completing any task (final validation step), running audits, preparing for deployment, or when ESLint/TypeScript/build errors occur.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

readme

Free

Use when starting work on an AstroDeck project, needing to understand the project structure, or looking up available components, sections, and layouts.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

Use when creating or modifying any visible UI element, adjusting spacing or typography, reviewing visual consistency, or when Lighthouse Performance drops below 90.

The English summary is being prepared. Showing the original description.

holger1411/astrodeck80Updated Sep 5, 2026

See all skills by holger1411

Report a problem with this skill