본문으로 건너뛰기
Skillpedia
브랜딩48k · #5922

tailwind-patterns

하는 일

이 도구는 최신 Tailwind CSS 기능을 설정하고 사용하도록 돕습니다. 예를 들어 CSS에서 직접 스타일을 지정하고, 개별 컴포넌트에 작은 화면 크기 기준을 쓰고, 최신 레이아웃을 만드는 기능입니다.

사용하는 경우

  • ✓Tailwind CSS 4 버전을 설정할 때.
  • ✓색상, 간격, 글꼴을 체계적으로 정의할 때.
  • ✓화면 크기나 페이지의 특정 부분에 따라 달라지는 디자인을 만드는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tailwind-patterns/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tailwind-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“새 토큰 시스템으로 기본 색상과 보조 색상을 어떻게 설정하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

CSS 파일에서 `@theme` 지시문을 사용해 스타일을 직접 정의할 수 있습니다. 이렇게 하면 색상, 글꼴, 간격을 더 효율적으로 정리할 수 있고, 컴포넌트를 적응시키는 '컨테이너 쿼리' 같은 새 기능을 쓸 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Tailwind CSS Patterns (v4 - 2025)

Modern utility-first CSS with CSS-native configuration.

When to Use

Use this skill when configuring Tailwind v4, using CSS-first theme and design tokens, or implementing container queries and modern Tailwind patterns.


1. Tailwind v4 Architecture

What Changed from v3

v3 (Legacy) v4 (Current)
tailwind.config.js CSS-based @theme directive
PostCSS plugin Oxide engine (10x faster)
JIT mode Native, always-on
Plugin system CSS-native features
@apply directive Still works, discouraged

v4 Core Concepts

Concept Description
CSS-first Configuration in CSS, not JavaScript
Oxide Engine Rust-based compiler, much faster
Native Nesting CSS nesting without PostCSS
CSS Variables All tokens exposed as --* vars

2. CSS-Based Configuration

Theme Definition

@theme {
  /* Colors - use semantic names */
  --color-primary: oklch(0.7 0.15 250);
  --color-surface: oklch(0.98 0 0);
  --color-surface-dark: oklch(0.15 0 0);
  
  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  
  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

When to Extend vs Override

Action Use When
Extend Adding new values alongside defaults
Override Replacing default scale entirely
Semantic tokens Project-specific naming (primary, surface)

3. Container Queries (v4 Native)

Breakpoint vs Container

Type Responds To
Breakpoint (md:) Viewport width
Container (@container) Parent element width

Container Query Usage

Pattern Classes
Define container @container on parent
Container breakpoint @sm:, @md:, @lg: on children
Named containers @container/card for specificity

When to Use

Scenario Use
Page-level layouts Viewport breakpoints
Component-level responsive Container queries
Reusable components Container queries (context-independent)

4. Responsive Design

Breakpoint System

Prefix Min Width Target
(none) 0px Mobile-first base
sm: 640px Large phone / small tablet
md: 768px Tablet
lg: 1024px Laptop
xl: 1280px Desktop
2xl: 1536px Large desktop

Mobile-First Principle

  1. Write mobile styles first (no prefix)
  2. Add larger screen overrides with prefixes
  3. Example: w-full md:w-1/2 lg:w-1/3

5. Dark Mode

Configuration Strategies

Method Behavior Use When
class .dark class toggles Manual theme switcher
media Follows system preference No user control
selector Custom selector (v4) Complex theming

Dark Mode Pattern

Element Light Dark
Background bg-white dark:bg-zinc-900
Text text-zinc-900 dark:text-zinc-100
Borders border-zinc-200 dark:border-zinc-700

6. Modern Layout Patterns

Flexbox Patterns

Pattern Classes
Center (both axes) flex items-center justify-center
Vertical stack flex flex-col gap-4
Horizontal row flex gap-4
Space between flex justify-between items-center
Wrap grid flex flex-wrap gap-4

Grid Patterns

Pattern Classes
Auto-fit responsive grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]
Asymmetric (Bento) grid grid-cols-3 grid-rows-2 with spans
Sidebar layout grid grid-cols-[auto_1fr]

Note: Prefer asymmetric/Bento layouts over symmetric 3-column grids.


7. Modern Color System

OKLCH vs RGB/HSL

Format Advantage
OKLCH Perceptually uniform, better for design
HSL Intuitive hue/saturation
RGB Legacy compatibility

Color Token Architecture

Layer Example Purpose
Primitive --blue-500 Raw color values
Semantic --color-primary Purpose-based naming
Component --button-bg Component-specific

8. Typography System

…

자주 묻는 질문

'브레이크포인트'와 '컨테이너 쿼리'의 차이는 무엇인가요?

브레이크포인트는 화면 전체의 크기를 기준으로 하고, 컨테이너 쿼리는 상위 요소의 크기를 기준으로 합니다. 그래서 컴포넌트가 페이지 크기와 별개로 적응할 수 있습니다.

운영체제가 다크 모드일 때 사이트가 자동으로 어두워지게 하려면 어떻게 하나요?

Tailwind 설정에서 'media' 전략을 사용해, 다크 모드를 시스템 설정에 따르도록 구성할 수 있습니다.

'디자인 토큰'이란 무엇인가요?

색상과 간격처럼 디자인 값을 나타내는 변수입니다. 시각적 일관성을 유지하고 프로젝트 전체의 스타일을 쉽게 업데이트하도록 돕습니다.

상세 정보

작성자의 원본 설명

Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5922
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬