Repository navigation
[DONE] Pattern Lab CSS 에서 아무 컴포넌트도 쓰지 않던 클래스 13개와 그 규칙 220줄이 빠진다 - #223
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxHZJYQmJBPASBcBvdaLbJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxHZJYQmJBPASBcBvdaLbJ
patternflow-bot
marked this pull request as ready for review
October 24, 2026 12:50
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
Patternflow-lab#183 Patternflow-lab#184 Patternflow-lab#186 Patternflow-lab#187 Patternflow-lab#189 Patternflow-lab#191 Patternflow-lab#192 Patternflow-lab#193 Patternflow-lab#194 Patternflow-lab#196 Patternflow-lab#197 Patternflow-lab#198 Patternflow-lab#199 Patternflow-lab#200 Patternflow-lab#202 Patternflow-lab#203 Patternflow-lab#204 Patternflow-lab#205 Patternflow-lab#206 Patternflow-lab#208 Patternflow-lab#209 Patternflow-lab#210 Patternflow-lab#214 Patternflow-lab#217 Patternflow-lab#218 Patternflow-lab#221 Patternflow-lab#222 Patternflow-lab#223 Patternflow-lab#227 Patternflow-lab#237 Patternflow-lab#238 Patternflow-lab#239 Patternflow-lab#240
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.
ops / https://claude.ai/code/session_01NxHZJYQmJBPASBcBvdaLbJ
Pattern Lab 의 CSS 파일 셋에서 어느 컴포넌트도 쓰지 않던 클래스 13개와 그 규칙 220줄을 걷었어요. 화면은 한 픽셀도 바뀌지 않고, 앞으로 Lab 에 같은 클래스가 생기면 Lab CSS 시험이 빨개져요.
좋아지는 것: 없음
체크리스트
23 은 바퀴 6688 이 맡았고, 남은 줄 가운데 맨 위가 24985b49d에서 13개, 표와 같음f35b2be([DONE] 연구 페이지에 화장품 팝업과 위상·매듭 갈래가 열리고, 수학 여섯과 화장품 질감 넷이 패턴으로 선다 #219,incoming/만) merge ·c76caeb에서 Drift checks · Web CI 초록한 일
web/src/app/pattern-lab/PatternLab.module.css에서 9개(header,headerMeta,actionRow,previewHeader,editorHeader,guideButton,pasteButton,clearButton,viewToggle)를 걷었어요. 죽은 이름만 든 규칙은 통째로 빠졌고, 산 클래스와 묶인 셀렉터에선 죽은 이름만 뺐어요(.darkButton, .editorHeader button→.darkButton). 그러고 나니.stats규칙 셋이 나란히 남아서 지금 이기는 값으로 하나로 합쳤어요(gap: 8px,text-transform: none,flex-wrap: wrap,line-height: 1.45). 980px 아래 블록엔.stats하나만 남아요.panels/CapturePanel.module.css에서stageBox,stageCanvas,stageCanvasTransparent를,panels/DirectorPanel.module.css에서hint를 걷었어요.labCss.test.ts에 「Lab CSS modules › define no class that no component uses」를 더했어요.app/pattern-lab/아래*.module.css마다, 그 파일을 불러오는src/의.ts·.tsx가styles.x나styles["x"]로 읽는 이름과 같은 파일 안의composes를 모아, 어디서도 안 읽는 클래스가 있으면 파일별 이름 목록으로 빨개져요. 계산된 이름(styles[name])으로 읽는 모듈은 통째로 쓰인 것으로 쳐요.CSS 는 226줄 빠지고 6줄 들어와 220줄이 줄었어요. 표가 센 169줄은 셀렉터가 다 죽은 규칙만이고, 220줄은 빈 줄 32줄과 주석, 묶인 셀렉터에서 뺀 이름, 합친
.stats까지 든 diff 그대로예요.증거
다시 센 것(dev 와 이 브랜치, 같은 스크립트 —
import x from "….module.css"를 찾아x.name,x["name"],composes를 모아요. 동적 접근은 0곳이었어요):화면이 그대로인지:
NEXT_PUBLIC_BUILD_ENABLED=1로 빌드해 To hardware 가 보이게 하고, Chromium 으로/pattern-lab을 390×844(터치)와 1440×900 에서 열어 패널 탭 아홉(Preview, Layers, Code, Pixel, Text, Knobs, Color Ramp, Graphic Export, Director)을 하나씩 앞으로 꺼내고 Code guide 창과 To hardware 창까지 22가지 상태에서 요소마다getComputedStyle의 모든 속성과::before·::after를 모았어요. 같은 dev 빌드를 두 번 찍으면 0 차이인 것을 먼저 봤어요(사용자 지정 속성 순서가 실행마다 달라서 속성을 정렬해 비교해요)..stats를 합친 규칙도 빌드된 CSS 에서 같은 값으로 나와요:CSS 크기(
.next/static/chunks/*.css):/pattern-lab첫 로드 CSS/community첫 로드 CSSGraphic Export 의 CSS 가 27줄 줄어 2 KB 남짓이 되자 Turbopack 이 그것을 따로 늦게 받는 파일 대신 Lab·커뮤니티가 같이 받는 묶음에 합쳤어요. 그래서 첫 로드 gzip 은 139 B 늘었고, Graphic Export 를 열 때 받던 요청 하나가 없어졌어요.
시험이 정말 잡는지:
PatternLab.module.css를 dev 판으로 되돌리고CodePanel.module.css끝에.zzDead {}를 넣어 돌리면 빨개져요.다섯 검사(
web/, 끝줄):dev 를 merge 한
c76caeb의 GitHub 검사:화면을 바꾸지 않아서 PR 에 사진은 싣지 않았어요. 위 22장은 스크래치 폴더에서 픽셀 비교에만 썼어요.
실행법
cd web npx vitest run src/app/pattern-lab/labCss.test.ts가정
.stats규칙 셋은 하나로 합쳤어요. 같은 셀렉터가 연달아 셋이면 뒤가 앞을 덮는 값(gap10px → 8px,text-transformuppercase → none)을 읽는 사람이 따져야 해서예요. 계산된 스타일 비교가 0 차이라 값은 그대로예요.next.config)은 고치지 않았어요.app/roadmap/Roadmap.module.css11개(legend,zoomBtn들),components/community/Community.module.css9개(gatePanel들)예요. 이 셈엔 거짓 양성(org,w3은 SVG data URL 안의 글자)도 섞여 있어 다시 재야 해요.Changelog
Web
경험
언제: 바퀴에서 CSS 만 걷고 화면이 그대로인 것을 보여야 할 때
교훈: 요소마다
getComputedStyle의 모든 속성을 정렬해 모으고 dev 를 두 번 찍어 0 차이부터 확인하면, 사진 대신 「요소 몇 개 가운데 0 차이」로 보일 수 있고 정렬하지 않으면 사용자 지정 속성 순서 탓에 거의 다 다르게 나와요근거: #223 에서 정렬 없이 dev 두 번을 비교하니 5,775 요소 가운데 5,518개가 달랐고, 정렬하니 0 이 됐어요
바퀴
바퀴 89 · 후보 24 「Pattern Lab CSS 에서 아무 컴포넌트도 쓰지 않는 클래스 13개와 그 규칙 169줄이 빠진다」
다음 바퀴
globals.css의.panel-body p가 모듈 클래스를 이겨 14~15px 글이 20px 로 나와요.🤖 Generated with Claude Code
https://claude.ai/code/session_01NxHZJYQmJBPASBcBvdaLbJ