Files
2nd/10_Wiki/Topics/Frontend/디자인 시스템의 타이포그래피 토큰 확장 및 최적화.md
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

5.8 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-디자인-시스템의-타이포그래피-토큰-확장-및-최적화 디자인 시스템의 타이포그래피 토큰 확장 및 최적화 10_Wiki/Topics verified self
Typography Tokens
Type Scale
Design Token Typography
none A 0.9 applied
design-system
typography
tokens
css
frontend
2026-05-10 pending
language framework
css design-tokens

디자인 시스템의 타이포그래피 토큰 확장 및 최적화

매 한 줄

"매 typography token = semantic role + multi-platform output + fluid scale". 매 raw value (16px) 의 X — 매 role-based (text.body.md) 매 의미. 매 2026 modern = 매 fluid clamp() + 매 W3C Design Tokens (DTCG) format + 매 Style Dictionary 매 multi-platform export.

매 핵심

매 Token 계층

  1. Primitive (raw): font.size.100 = 12px, font.weight.400 = 400.
  2. Semantic (role): text.body.md, text.heading.lg, text.caption.sm.
  3. Component: button.label.font = text.body.md.

매 component → semantic → primitive — 매 referential.

매 Scale 전략

  • Modular scale: 1.25 (Major Third), 1.333 (Perfect Fourth), 1.5.
  • Fluid: clamp(min, preferred, max) — viewport 매 자동 조정.
  • Step naming: T-shirt (xs/sm/md/lg/xl) OR numeric (100/200/300).

매 핵심 properties

  • font-family, font-size, font-weight, line-height, letter-spacing, text-transform.
  • 매 함께 묶어 매 "type style" 의 token — 매 atomic 의 X.

매 응용

  1. Multi-brand theme (브랜드별 token override).
  2. Dark mode (semantic 동일, primitive 만 swap).
  3. Accessibility (rem 매 user font-size scale).

💻 패턴

W3C DTCG token (JSON)

{
  "font": {
    "family": {
      "sans": { "$value": "Inter, system-ui, sans-serif", "$type": "fontFamily" }
    },
    "size": {
      "100": { "$value": "0.75rem", "$type": "dimension" },
      "200": { "$value": "0.875rem", "$type": "dimension" },
      "300": { "$value": "1rem", "$type": "dimension" }
    }
  },
  "text": {
    "body": {
      "md": {
        "$value": {
          "fontFamily": "{font.family.sans}",
          "fontSize": "{font.size.300}",
          "lineHeight": "1.5",
          "fontWeight": "400"
        },
        "$type": "typography"
      }
    }
  }
}

Fluid type scale (clamp)

:root {
  --text-body-md: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
  --text-heading-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --text-display-xl: clamp(2.5rem, 1.5rem + 5vw, 4.5rem);
}

CSS Custom Properties (semantic)

:root {
  /* primitive */
  --font-size-100: 0.75rem;
  --font-size-200: 0.875rem;
  --font-size-300: 1rem;
  --font-weight-regular: 400;
  --font-weight-bold: 700;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
}

:root {
  /* semantic */
  --text-body-md-size: var(--font-size-300);
  --text-body-md-weight: var(--font-weight-regular);
  --text-body-md-line: var(--line-height-normal);
}

.body-md {
  font-size: var(--text-body-md-size);
  font-weight: var(--text-body-md-weight);
  line-height: var(--text-body-md-line);
}

Style Dictionary build (multi-platform)

// style-dictionary.config.js
module.exports = {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      transformGroup: 'css',
      buildPath: 'build/css/',
      files: [{ destination: 'tokens.css', format: 'css/variables' }]
    },
    ios: {
      transformGroup: 'ios-swift',
      buildPath: 'build/ios/',
      files: [{ destination: 'Tokens.swift', format: 'ios-swift/class.swift' }]
    },
    android: {
      transformGroup: 'android',
      buildPath: 'build/android/',
      files: [{ destination: 'tokens.xml', format: 'android/resources' }]
    }
  }
};

Tailwind v4 theme

@theme {
  --font-sans: "Inter", system-ui, sans-serif;
  --text-body-md: 1rem;
  --text-body-md--line-height: 1.5;
  --text-heading-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
}

Variable font (1 file 매 weight 모두)

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
.heading { font-weight: 650; }  /* 매 정확한 weight */

Optical sizing

.display { font-size: 4rem; font-optical-sizing: auto; }  /* 매 large 매 다른 glyph */

매 결정 기준

상황 접근
단일 product CSS Custom Properties + clamp
Multi-platform (web + iOS + Android) DTCG JSON + Style Dictionary
Tailwind 사용 @theme directive
Brand theming semantic layer override
Variable font 사용 가능 weight axis token

기본값: DTCG JSON source → Style Dictionary → CSS vars + 매 fluid clamp.

🔗 Graph

🤖 LLM 활용

언제: token naming review, 매 type scale generate, DTCG → CSS conversion. 언제 X: 매 brand-specific font pairing — 매 designer 매 결정.

안티패턴

  • Pixel hardcode 매 component: 매 token 의 우회.
  • Primitive 직접 사용 매 component: 매 semantic layer 누락.
  • 너무 많은 step: 매 14 size — 매 6-8 매 충분.
  • non-rem 사용: px — 매 a11y zoom 차단.
  • font-size 만 token: line-height 누락 — 매 묶음 typography token 의 사용.

🧪 검증 / 중복

  • Verified (DTCG W3C spec, Style Dictionary docs, Material Design 3, Polaris).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — DTCG + fluid clamp + Style Dictionary