refactor(fe): 그림자를 elevation 토큰으로, 관계 지도 무채색 리터럴을 시맨틱 토큰으로#124
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
styles.css에 elevation 1~4 단계 토큰을 라이트/다크 각각 정의하고 @theme inline에 shadow-e1~e4 유틸을 등록했다. 테마별로 자동 전환되므로 dark:shadow-[...] 중복을 제거한다. 관계 지도에서 반복되던 무채색 zinc/white 리터럴을 background/foreground/muted 등 시맨틱 토큰으로 치환해 dark: 짝을 없앴다. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
seongbin9786
force-pushed
the
refactor/fe-elevation-and-map-tokens
branch
from
July 19, 2026 08:15
6a87c12 to
bd40f80
Compare
seongbin9786
marked this pull request as ready for review
July 19, 2026 08:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
관계 지도와 타임라인 곳곳에
shadow-[...]와 그에 짝지어진dark:shadow-[...]리터럴이 흩어져 있었고, 관계 지도에는bg-white dark:bg-zinc-950처럼 무채색 zinc/white 리터럴과 dark 짝이 반복됐다. 값이 코드에 박혀 있어 elevation 단계를 조정하거나 테마 대응을 바꾸기 어려웠다.변경 내용
styles.css에 elevation 1~4 단계 토큰을 라이트/다크 각각 정의했다(--letter-paper,--color-*선례와 동일한 방식).@theme inline에--shadow-e1--shadow-e4를 등록해shadow-e1shadow-e4유틸이 생성되도록 했다. 토큰이 테마별로 자동 전환되므로dark:shadow-[...]중복이 사라진다.background/foreground/muted/muted-foreground/accent/border토큰으로 치환했다(styles.css에 새 색 토큰 추가 없음).시각 확인 필요
이 PR은 값을 정규화하면서 일부 그림자의 blur/불투명도가 미세하게 바뀌고, 라이트 전용이던 그림자에 다크 그림자가 새로 생긴다. 머지 전에 라이트/다크 두 모드에서 아래 지점을 눈으로 확인해 주세요.
0 10px 30px rgba(0,0,0,0.045)에서 라이트shadow-e3(불투명도 0.045 → 0.08)로 바뀌어 그림자가 뚜렷해진다. 다크에서는 기존에 검정 저투명 그림자가 두 모드 공통으로 쓰였는데, 이제 다크 전용값rgba(0,0,0,0.32)가 적용되어 다크에서 특히 강해진다. hover 그림자도shadow-e4로 커진다.shadow-e1), 관계 지도 내 이름 라벨과 인물 이름 라벨(shadow-e1)은 원래 다크 그림자가 없었다. 이제 다크에서 그림자가 보이는 의도된 다크 모드 보정이다.shadow-e3): blur가 20px → 24px로 커지고 다크 불투명도가 0.28 → 0.32로 올라간다.shadow-e2): blur가 20px → 18px로 줄고 불투명도가 낮아져 그림자가 살짝 옅어진다.shadow-e4): 라이트 불투명도가 0.14 → 0.12로 약간 옅어진다(다크는 0.38로 동일).무채색 치환(G)은 같은 회색 또는 매우 가까운 회색으로 매핑되어 겉보기 차이가 거의 없어야 한다. 그림자 정규화(elevation)만 위처럼 일부 값이 달라진다. 앰버 글로우, 스프레드 링, 음수 스프레드 그림자, SVG stroke, stone 궤도선은 건드리지 않았다.
그림자 토큰 매핑
0 10px 24px rgba(24,24,27,0.08)+ dark0 10px 24px rgba(0,0,0,0.34)shadow-e30 8px 18px rgba(24,24,27,0.05)+ dark0 8px 18px rgba(0,0,0,0.24)shadow-e20 10px 20px rgba(24,24,27,0.14)+ dark0 10px 20px rgba(0,0,0,0.28)shadow-e30 4px 12px rgba(24,24,27,0.08)(다크 없음)shadow-e10 8px 18px rgba(24,24,27,0.06)+ dark0 8px 18px rgba(0,0,0,0.28)shadow-e20 8px 20px rgba(24,24,27,0.1)+ dark0 8px 20px rgba(0,0,0,0.32)shadow-e20 4px 12px rgba(24,24,27,0.06)(다크 없음)shadow-e10 18px 42px rgba(24,24,27,0.14)+ dark0 18px 42px rgba(0,0,0,0.38)shadow-e40 5px 16px rgba(0,0,0,0.08)(다크 없음)shadow-e10 10px 30px rgba(0,0,0,0.045)shadow-e30 14px 36px rgba(0,0,0,0.07)hover:shadow-e4토큰 정의값:
e1 = 0 4px 12px rgba(24,24,27,0.07)/ darkrgba(0,0,0,0.30),e2 = 0 8px 18px rgba(24,24,27,0.06)/ darkrgba(0,0,0,0.26),e3 = 0 10px 24px rgba(24,24,27,0.08)/ darkrgba(0,0,0,0.32),e4 = 0 18px 42px rgba(24,24,27,0.12)/ darkrgba(0,0,0,0.38).건드리지 않은 맞춤 그림자 3종:
relation-force-map.tsxme-core0 0 0 4px rgba(0,0,0,0.04)activity-flow-chart.tsx0 18px 50px -24px rgba(0,0,0,0.45)profile-onboarding.tsx아바타무채색 토큰 치환
bg-white/82 dark:bg-zinc-950/82bg-background/82bg-zinc-950 dark:bg-zinc-50bg-foregroundbg-white dark:bg-zinc-950(2곳)bg-backgroundtext-zinc-950 dark:text-zinc-50(2곳)text-foregroundtext-zinc-500 dark:text-zinc-400text-muted-foregroundtext-zinc-600 dark:text-zinc-300text-muted-foregroundhover:bg-zinc-100 dark:hover:bg-zinc-800hover:bg-accenthover:text-zinc-950 dark:hover:text-whitehover:text-foregroundbg-zinc-100/78 dark:bg-zinc-900/78bg-muted/78bg-white/80 dark:bg-zinc-950/82bg-background/80ring-zinc-200/70 dark:ring-white/10ring-border전용 토큰이 없어 이번에는 손튜닝 값으로 남긴 항목(코드에 인라인 주석 표시):
text-zinc-700 dark:text-zinc-200bg-zinc-300 dark:bg-zinc-700stroke-zinc-950/25 dark:stroke-zinc-100/30,stroke-zinc-950/12 dark:stroke-zinc-100/16stroke-stone-*궤도선