refactor: JDS typography color를 변수 주입 방식으로 변경#477
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Walkthrough
ChangesCSS 변수 기반 색상 주입 리팩토링
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
ccconac
left a comment
There was a problem hiding this comment.
충분히 논의 나눈 후에 진행된 작업이라, 바로 머지해도 괜찮아 보여서 승인해 둘게요.
반영 감사합니다. (__)
개요
getLabelClassName/getTitleClassName이 적용된 엘리먼트에서 색을 변경할 때, 같은 엘리먼트에color:를 직접 선언하던 부분을 CSS 변수(labelColorVar) 주입 방식으로 변경합니다.배경
typography recipe(
label/title)의 base는color: fallbackVar(labelColorVar, default)(명시도(0,1,0))로 색을 정합니다. 소비자가 같은 엘리먼트에color:를 또 선언하면(0,1,0)동점이 되어, 승자가 CSS extraction/import 순서에 종속되는 fragile한 상태가 됩니다. (VE가 media query를 파일 끝에 강제 배치하는 것과 같은 이유)→ recipe는 타이포만 책임지고, 색은 소비자가
labelColorVar에 주입하도록 하여 동점 자체를 제거합니다.변경 사항
JDS 컴포넌트를 전수 점검하여
color:직접 지정으로 동점이 발생하던 vanilla-extract 소비자를 변수 주입으로 전환했습니다.Tooltip—contentSteps—stepsLabelactivated변형ContentBadge—labelNumericBadge—label검증
tsc -b --noEmit✅eslint --max-warnings 0✅참고
관련 논의 쓰레드
장기적으로
getLabelClassName({ color })같은 공개 API화 / CSS@layer도입도 검토 가능하나, VE layer 추적 이슈(#1112)가 미해결이라 본 PR은fallbackVar방식으로 처리합니다.closes #476
Summary by CodeRabbit
릴리스 노트