-
Notifications
You must be signed in to change notification settings - Fork 1
[Init] vanilla extract css 세팅 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR sets up Vanilla Extract CSS in the project to replace the existing CSS setup. It configures the build tooling, adds global styles and CSS reset functionality, and integrates the new styling system into the application entry point.
- Configures Vanilla Extract CSS plugin in Vite build configuration
- Implements comprehensive CSS reset styles using Vanilla Extract
- Sets up global styles with responsive design variables and layout utilities
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Adds Vanilla Extract plugin configuration and updates import style |
| src/styles/reset.css.ts | Implements comprehensive CSS reset using Vanilla Extract globalStyle |
| src/styles/global.css.ts | Defines global styles, CSS variables, and reusable style utilities |
| src/app/main.tsx | Updates imports to use new CSS setup and removes old index.css |
| package.json | Adds Vanilla Extract dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WalkthroughVanilla Extract CSS-in-TS is added: new dependencies, Vite plugin integration, and two new style files (reset and global). The app entry now imports these styles. No exported APIs changed; edits include formatting updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Vite as Vite Dev/Build
participant VE as vanilla-extract Plugin
participant App as App Code
Dev->>Vite: Start dev/build
Vite->>VE: Initialize plugin
Vite->>App: Resolve modules
App-->>Vite: Import reset.css.ts, global.css.ts
Vite->>VE: Transform .css.ts files
VE-->>Vite: Emit CSS artifacts + JS mappings
Vite-->>Dev: Serve/bundle with generated CSS applied
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
vite.config.ts (1)
3-7: LGTM! Vanilla Extract 플러그인이 올바르게 통합되었습니다.플러그인 설정이 정확합니다. 필요시 디버깅을 위해
identifiers옵션을 추가할 수 있습니다 (예:vanillaExtractPlugin({ identifiers: 'debug' })).src/styles/global.css.ts (1)
38-38: boxShadow를 테마 변수로 관리하는 것을 고려하세요.고정된 색상값 대신 CSS 변수나 테마 토큰으로 관리하면 다크 모드 등 테마 전환 시 유리합니다.
예시:
globalStyle(":root", { vars: { "--min-width": "375px", "--max-width": "430px", "--height": "100dvh", + "--shadow-color": "rgba(0, 0, 0, 0.08)", }, }); export const rootStyle = style({ display: "flex", flexDirection: "column", width: "100%", margin: "0 auto", minHeight: "100dvh", minWidth: "var(--min-width)", maxWidth: "var(--max-width)", - boxShadow: "0 0 20px rgba(0, 0, 0, 0.08)", + boxShadow: "0 0 20px var(--shadow-color)", });src/styles/reset.css.ts (1)
280-281: placeholder 색상을 CSS 변수로 관리하는 것을 고려하세요.하드코딩된 색상값(
#9ca3af) 대신 CSS 변수를 사용하면 일관성 있는 컬러 시스템 관리에 유리합니다.global.css.ts의
:root에 변수 추가:globalStyle(":root", { vars: { "--min-width": "375px", "--max-width": "430px", "--height": "100dvh", "--placeholder-color": "#9ca3af", }, });reset.css.ts에서 사용:
globalStyle("input::placeholder, textarea::placeholder", { opacity: "1" /*1 */, - color: "#9ca3af" /*2 */, + color: "var(--placeholder-color)" /*2 */, });
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
package.json(1 hunks)src/app/main.tsx(1 hunks)src/styles/global.css.ts(1 hunks)src/styles/reset.css.ts(1 hunks)vite.config.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/app/main.tsx (1)
src/app/App.tsx (1)
App(4-23)
🔇 Additional comments (3)
src/app/main.tsx (1)
4-5: LGTM! 올바른 CSS 임포트 순서입니다.reset CSS를 global CSS보다 먼저 임포트하여 적절한 스타일 캐스케이드를 보장하고 있습니다.
src/styles/global.css.ts (1)
30-39: LGTM! 레이아웃 스타일이 잘 구성되었습니다.모바일 우선 반응형 레이아웃 스타일이 적절합니다. CSS 변수를 활용하여 유지보수성도 좋습니다.
src/styles/reset.css.ts (1)
1-331: LGTM! 포괄적이고 잘 구성된 CSS 리셋입니다.모던 CSS 리셋 패턴을 따르며 브라우저 기본 스타일을 효과적으로 정규화합니다. 주석도 명확하여 각 규칙의 목적을 이해하기 쉽습니다.
📌 Related Issue
✅ Checklist
📚 Tasks
Summary by CodeRabbit
신규 기능
리팩터
작업