Back to list
luthebao

tailwindcss

by luthebao

2🍴 1📅 Jan 10, 2026

SKILL.md


name: tailwindcss description: Style React components with Tailwind CSS v4 utility classes. Use when styling UI components, applying responsive designs, theming, or working with CSS-in-JS patterns. Covers v4 CSS-first configuration, @theme directive, new variants, and breaking changes from v3.

Tailwind CSS v4

Resources

Core Setup (v4)

CSS-First Configuration

Configure in CSS using @theme instead of tailwind.config.js:

@import 'tailwindcss';

@theme {
    --font-display: 'Satoshi', 'sans-serif';
    --breakpoint-3xl: 1920px;
    --color-brand: oklch(0.84 0.18 117.33);
    --ease-fluid: cubic-bezier(0.3, 0, 0, 1);
}

Import Syntax

/* v4 */
@import "tailwindcss";

/* v3 (deprecated) */
@tailwind base;
@tailwind components;
@tailwind utilities;

Package Changes

Purposev4 Package
PostCSS plugin@tailwindcss/postcss
CLI@tailwindcss/cli
Vite plugin@tailwindcss/vite

No need for postcss-import or autoprefixer.

Legacy Config Support

@import 'tailwindcss';
@config "../../tailwind.config.js";

Essential v4 Changes

Opacity Syntax

<!-- v4: Use color modifiers -->
<div class="bg-black/50 text-white/75 border-red-500/30">

<!-- v3 (removed): Don't use these -->
<div class="bg-black bg-opacity-50">

CSS Variables in Arbitrary Values

<!-- v4 -->
<div class="bg-(--brand-color)">

<!-- v3 (deprecated) -->
<div class="bg-[--brand-color]">

Renamed Utilities

  • shadow-smshadow-xs, shadowshadow-sm
  • blur-smblur-xs, blurblur-sm
  • rounded-smrounded-xs, roundedrounded-sm
  • outline-noneoutline-hidden

Default Changes

  • Border color: currentColor (was gray-200)
  • Ring width: 1px (was 3px)
  • Hover: only applies on @media (hover: hover)

Quick Patterns

Container Queries

<div class="@container">
  <div class="@md:flex @lg:grid">Responsive to container</div>
</div>

Dark Mode

@import 'tailwindcss';
@variant dark (&:where(.dark, .dark *));

Custom Utility

@utility scrollbar-hidden {
    scrollbar-width: none;
    &::-webkit-scrollbar { display: none; }
}

Custom Variant

@variant pointer-coarse (@media (pointer: coarse));

Guidelines

  • Prefer ShadCN for UI components
  • Avoid tailwind.config.js unless user requires it
  • Use CSS variables via @theme for theming

Detailed Reference

For complete documentation on theme namespaces, all new features, variants, breaking changes, and advanced configuration, see references/v4-reference.md.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon