"매 single-purpose utility class 의 의 의 의 의 — 의 stylesheet 의 의 의 markup 의 의 styling locality.". Tailwind CSS (2017, Adam Wathan) 의 의 의 의 popularize, 매 2026 의 Tailwind v4 (Oxide engine, Rust-based, 100x faster) + UnoCSS (engine-agnostic, on-demand) 의 의. 매 atomic CSS 의 의 의 component 의 의 (의 React component) 의 의 의 의 reusability 의 의 의 의.
매 핵심
매 utility-first 의 의
Locality: style 의 의 markup 의 — 의 stylesheet 의 의 의 jump 의.
No naming: BEM .card__header--featured 의 의 의 의.
Constraint-based: design token (spacing scale, color palette) 의 의 enforced.
Tree-shakable: 의 사용된 utility 의 의 ship — 의 small bundle.
Refactor-friendly: 의 selector specificity 의 의 — 의 confidence 의 change.
매 Tailwind v4 (2025-2026)
Oxide engine: Rust 의 rewrite — 100x faster, 의 PostCSS plugin 의 의.
CSS-first config: @theme directive — 의 tailwind.config.js 의 의.
Auto content detection: 의 content: [] config 의 의.
Native CSS variable: bg-blue-500 → --color-blue-500 의 의 직접 사용 의.
Email HTML — limited CSS support 의 의 utility 의 의 의 의 의.
Static site — Astro + Tailwind.
💻 패턴
Tailwind v4 setup (CSS-first)
/* app.css */@import"tailwindcss";@theme{--color-brand:oklch(0.70.15250);--font-display:"Inter",sans-serif;--breakpoint-3xl:1920px;}/* 매 의 더 ㅣ tailwind.config.js 의 의 */
<divclass="@container"><divclass="grid grid-cols-1 @md:grid-cols-2 @xl:grid-cols-4 gap-4"><Card/><!-- 의 viewport 의 의, container 의 의 --></div></div>
Custom utility (CSS-first)
@utilityscrollbar-hidden{scrollbar-width:none;&::-webkit-scrollbar{display:none;}}/* 매 사용 *//* <div class="scrollbar-hidden overflow-x-scroll"> */
Arbitrary value (escape hatch)
<!-- 매 design token 의 의 의 의 — arbitrary --><divclass="top-[117px] grid-cols-[1fr_2fr_1fr] bg-[oklch(0.7_0.15_250)]">
cn helper (clsx + twMerge)
import{clsx,typeClassValue}from'clsx';import{twMerge}from'tailwind-merge';exportfunctioncn(...inputs: ClassValue[]){returntwMerge(clsx(inputs));}// 매 사용 — 의 conflicting class 의 의 right-most 의 win
<divclassName={cn('p-4 bg-red-500',isActive&&'bg-blue-500',className)}/>
언제: utility class lookup, component refactor, responsive variant 추가, dark mode setup.
언제 X: visual design judgement (의 designer 의 의), pixel-perfect Figma 의 의 (의 visual review 의 의).
❌ 안티패턴
@apply 의 abuse: 매 utility 의 의 의 component class 의 — 의 utility-first 의 의 의 lose.
Long class string 의 의 abstraction 의 X: 50+ class 의 의 → cva variant 의 의.
Arbitrary value 의 의: 의 top-[117px] 의 의 → design token 추가.
Dynamic class 의 string interpolation: bg-${color}-500 — 의 tree-shake 의 의 (full class name 의 의 string 의 의).
Mixing CSS-in-JS + Tailwind: 의 specificity war — 의 의 의 의.
🧪 검증 / 중복
Verified (Tailwind v4 docs, Adam Wathan blog, UnoCSS docs, shadcn/ui).