refactor: Tailwind CSS 마이그레이션 및 색상 토큰 재구성 (v0.2.1)#10
Conversation
- Font sizes (h1-h6, body-1/2, caption, overline) CSS 변수 추가 - Font weights (regular, medium, semibold, bold) CSS 변수 추가 - Line heights 각 타이포그래피 스타일별 CSS 변수 추가 - Letter spacing 각 타이포그래피 스타일별 CSS 변수 추가 - Tailwind CSS v4의 @theme 문법으로 타이포그래피 토큰 노출 - 사용처에서 Tailwind 유틸리티 클래스로 타이포그래피 스타일 사용 가능
- text-h1, text-h2, text-h3, text-h4, text-h5, text-h6 클래스 추가 - text-subtitle-1, text-body-1, text-body-1-b 클래스 추가 - text-subtitle-2, text-body-2 클래스 추가 - text-caption, text-overline 클래스 추가 - Tailwind CSS v4의 @Utility 디렉티브 사용 - 각 클래스가 fontSize, fontWeight, lineHeight, letterSpacing을 한 번에 적용 - 사용 예시: <div className="text-h1">제목</div>
- CSS 파일을 관심사별로 분리 - tokens/: CSS 변수 정의 (colors, typography, shadows) - theme/: Tailwind 테마 설정 (colors, typography) - utilities/: 커스텀 유틸리티 클래스 (typography) - 색상 토큰 재구성 - :root에 실제 색상 이름으로 정의 (orange, green, red, gray) - @theme에서 시멘틱 색상으로 매핑 (primary → orange, secondary → green, tertiary → red) - 실제 색상과 시멘틱 색상 모두 사용 가능 (bg-orange-500, bg-primary-500) - CSS 변수 직접 사용 가능 (var(--color-orange-500), var(--color-primary-500)) - README 업데이트 - 색상 사용 방법 명확화 (실제 색상 vs 시멘틱 색상) - Tailwind 테마 커스터마이징 가이드 개선 - CSS 변수 사용 예시 추가 - CHANGELOG 업데이트 - Unreleased 섹션에 변경 사항 추가
- package.json 버전 0.2.0 -> 0.2.1 - CHANGELOG.md 업데이트 - Unreleased 내용을 0.2.1 (2025-01-18)로 이동 - 버전 링크 추가
📝 WalkthroughWalkthroughRefactors CSS into modular token/theme/utility files, removes vanilla-extract plugin integrations from build/test configs, updates docs and changelog, and bumps package version to 0.2.1. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
69-71: Remove unused vanilla-extract dependencies and build configuration.The codebase has completed migration to Tailwind CSS—no vanilla-extract imports remain in component code and all
.css.tsfiles have been removed. However, vanilla-extract plugins are still configured invitest.config.ts,vite.config.ts, andtsup.config.ts, and the dependencies remain inpackage.json(lines 69-71). Remove:
@vanilla-extract/css,@vanilla-extract/esbuild-plugin, and@vanilla-extract/vite-pluginfrompackage.json- The corresponding plugin imports and configurations from the build config files
🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 10: Update the release header line in CHANGELOG.md for version 0.2.1 to
use the correct year: change "## [0.2.1] - 2025-01-18" to "## [0.2.1] -
2026-01-18" so the version date reflects the current year.
🧹 Nitpick comments (1)
src/styles/theme/typography.css (1)
51-56: Consider moving shadow definitions to a dedicated theme file.Shadow definitions are duplicated here and in
tokens/shadows.css. While the:root(tokens) and@theme(Tailwind) declarations serve different purposes, placing shadows intypography.cssis misleading. Consider creatingtheme/shadows.cssfor consistency with the modular structure and to reduce maintenance overhead when updating shadow values.♻️ Suggested approach
Create a new
src/styles/theme/shadows.css:/* Tailwind Theme - Shadows */ `@theme` { --shadow-floating: var(--shadow-floating); --shadow-btn-pressed: var(--shadow-btn-pressed); --shadow-dimmed: var(--shadow-dimmed); }Then reference the token variables instead of duplicating the raw values.
- package.json에서 vanilla-extract 관련 의존성 3개 제거 - @vanilla-extract/css - @vanilla-extract/esbuild-plugin - @vanilla-extract/vite-plugin - 빌드 설정 파일에서 vanilla-extract 플러그인 제거 - vitest.config.ts - vite.config.ts - tsup.config.ts - pnpm-lock.yaml 업데이트 모든 빌드 및 테스트 통과 확인 완료
- 날짜 수정 (2025-01-18 -> 2026-01-18) - Removed 섹션 추가: vanilla-extract 의존성 및 플러그인 제거 내용
📝 Summary
vanilla-extract에서 Tailwind CSS v4로 마이그레이션하고, 색상 토큰 시스템을 재구성했습니다.
🎯 주요 변경사항
1. Tailwind CSS v4 마이그레이션
2. CSS 파일 구조 개선
3. 색상 토큰 재구성
4. 테스트 커버리지
✅ Checklist
Summary by CodeRabbit
New Features
Documentation
Refactor
Chores
✏️ Tip: You can customize this high-level summary in your review settings.