refactor(css): 다크 모드에서 라이트와 동일한 변수 재선언 제거 - #92
Merged
Conversation
- .dark 블록에서 :root와 값이 동일한 23개 변수(font, radius, shadow, chart) 제거 - 테마에 무관한 변수는 :root 에만 선언하여 단일 원천(Single Source of Truth) 유지 - 한쪽만 수정 시 불일치가 발생하는 유지보수 위험 제거 및 CSS 파일 크기 절감
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.
변경 내용
src/app/globals.css의.dark선택자 블록에서:root와 완전히 동일한 값을 가졌던 23개 변수 선언 제거--font-sans,--font-serif,--font-mono)--radius)--shadow-*)--chart-*):root에만 단일 선언하여 관리하도록 개선변경 이유
.dark블록 내의 불필요한 토큰 중복으로 인해 약 1.5KB의 CSS 파일 크기가 낭비되고 있었습니다.:root와.dark두 곳을 동시에 수정해야 하므로, 한쪽만 수정될 경우 발생하는 토큰 불일치 위험을 해소하기 위함입니다.검증
pnpm lint: Biome 린트 검사 통과 (0 errors)pnpm typecheck: TypeScript strict 타입 검사 통과pnpm test: Vitest 32개 테스트 파일 / 225개 테스트 전체 통과pnpm build: Next.js SSG 정적 빌드 및 Pagefind 색인 생성 성공