From 8ed5beb8fda6e620a902db2f4ae51c009718a520 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 1 Nov 2026 22:36:32 +0900 Subject: [PATCH] =?UTF-8?q?fix(design-system):=20=ED=95=9C=EA=B5=AD?= =?UTF-8?q?=EC=96=B4=20=EB=AC=B8=EA=B5=AC=EA=B0=80=20=EB=8B=A8=EC=96=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EC=97=90=EC=84=9C=EB=A7=8C=20=EC=A4=84?= =?UTF-8?q?=EB=B0=94=EA=BF=88=EB=90=98=EA=B2=8C=20=ED=95=9C=EB=8B=A4=20(08?= =?UTF-8?q?-06)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: 스타일·토큰 어디에도 word-break가 없어 브라우저 기본값으로 한국어를 음절마다 끊는다. 골든에 "마운 / 트", "계 / 속할"이 있고, 텍스트 200%에서 로그인 버튼이 "로그 / 인"으로 쪼개졌다. PRODUCT.md의 한국어 기본 원칙과 맞지 않고 모든 파생 서비스가 받는다. 고른 방법: base.css에 :lang(ko) { word-break: keep-all; overflow-wrap: break-word; }를 둔다. :lang(ko)라 en-US 문서 안의 lang="ko-KR" 구역에도 적용된다. 버린 대안: 리뷰 제안의 overflow-wrap: anywhere — min-content 계산에도 끊을 자리를 더해, 공간이 좁은 flex 항목(헤더 버튼)이 줄어들며 라벨을 다시 쪼갠다. break-word는 넘칠 때만 끊는다. 긴 영문·코드 토큰은 기존 pages.css의 anywhere 두 곳이 그대로 받는다. 위험·한계: 화면이 바뀐다. 좁은 칸에서 줄 수가 늘 수 있다. 시각 골든은 오케스트레이터가 갱신한다. 실제 브라우저 "글자만 확대" 설정에서의 줄바꿈은 눈으로 확인하지 않았다. 검증: - RED: typography.spec.ts 새 테스트가 수정 전 chromium에서 실패 (wordBreak "normal", overflowWrap "normal"). - GREEN: typography.spec.ts chromium·firefox·webkit 6/6 통과. accessibility·i18n(320px 가로 넘침 포함)·ui-gallery·app-shell· responsive·theme·compact-smoke·platform-overview chromium/compact 34/34 통과. check-design-system PASS. 시각 회귀는 미실행. Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-06 --- src/presentation/styles/theme/base.css | 9 +++++++++ tests/e2e/typography.spec.ts | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/presentation/styles/theme/base.css b/src/presentation/styles/theme/base.css index 3c2a3d82..b0ecc0e6 100644 --- a/src/presentation/styles/theme/base.css +++ b/src/presentation/styles/theme/base.css @@ -11,6 +11,15 @@ min-height: 100vh; } + /* 08-06. Korean breaks between words, not between syllables. A word too + long for its box still wraps. `break-word`, not `anywhere`: `anywhere` + also shrinks min-content, so a squeezed flex item (a header button) + would split its label again. */ + :lang(ko) { + word-break: keep-all; + overflow-wrap: break-word; + } + button, input, textarea, diff --git a/tests/e2e/typography.spec.ts b/tests/e2e/typography.spec.ts index 3fa3cfe3..fa707b6a 100644 --- a/tests/e2e/typography.spec.ts +++ b/tests/e2e/typography.spec.ts @@ -31,3 +31,18 @@ test("steps heading size and weight down from h2 to body copy", async ({ expect(scale.h2.weight).toBeGreaterThan(scale.body.weight); expect(scale.h3.weight).toBeGreaterThan(scale.body.weight); }); + +// 08-06. The browser default breaks Korean between any two syllables, so a +// button read "로그 / 인". Korean text breaks between words; a single word +// longer than its box still wraps instead of overflowing. +test("breaks Korean text between words, not inside them", async ({ page }) => { + await page.goto("/"); + await expect(page.locator("html")).toHaveAttribute("lang", "ko-KR"); + + const wrapping = await page.locator("body").evaluate((body) => { + const style = getComputedStyle(body); + return { wordBreak: style.wordBreak, overflowWrap: style.overflowWrap }; + }); + + expect(wrapping).toEqual({ wordBreak: "keep-all", overflowWrap: "break-word" }); +});