--- id: wiki-2026-0508-유틸리티-퍼스트-utility-first title: 유틸리티 퍼스트(Utility-first) category: 10_Wiki/Topics status: verified canonical_id: self aliases: [Utility-first CSS, Tailwind, Atomic CSS] duplicate_of: none source_trust_level: A confidence_score: 0.9 verification_status: applied tags: [css, tailwind, utility-first, frontend, styling] raw_sources: [] last_reinforced: 2026-05-10 github_commit: pending tech_stack: language: CSS framework: Tailwind/UnoCSS --- # 유틸리티 퍼스트(Utility-first) ## 매 한 줄 > **"매 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` 의 의 직접 사용 의. - **Container queries**: `@container` first-class. ### 매 응용 1. SPA / dashboard — rapid iteration. 2. Component library — Radix + Tailwind (shadcn/ui pattern). 3. Email HTML — limited CSS support 의 의 utility 의 의 의 의 의. 4. Static site — Astro + Tailwind. ## 💻 패턴 ### Tailwind v4 setup (CSS-first) ```css /* app.css */ @import "tailwindcss"; @theme { --color-brand: oklch(0.7 0.15 250); --font-display: "Inter", sans-serif; --breakpoint-3xl: 1920px; } /* 매 의 더 ㅣ tailwind.config.js 의 의 */ ``` ### Component composition (React + Tailwind) ```tsx import { cva, type VariantProps } from 'class-variance-authority'; import { twMerge } from 'tailwind-merge'; const button = cva( 'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:opacity-50', { variants: { intent: { primary: 'bg-brand text-white hover:bg-brand/90', secondary: 'bg-gray-200 text-gray-900 hover:bg-gray-300', ghost: 'hover:bg-gray-100', }, size: { sm: 'h-8 px-3 text-sm', md: 'h-10 px-4', lg: 'h-12 px-6 text-lg', }, }, defaultVariants: { intent: 'primary', size: 'md' }, } ); type Props = React.ButtonHTMLAttributes & VariantProps; export function Button({ className, intent, size, ...props }: Props) { return