Skip to content

style: introduce modular typographic scale tokens and replace literal font sizes - #90

Open
harryjupiter148 wants to merge 5 commits into
FinesseStudioLab:mainfrom
harryjupiter148:main
Open

style: introduce modular typographic scale tokens and replace literal font sizes#90
harryjupiter148 wants to merge 5 commits into
FinesseStudioLab:mainfrom
harryjupiter148:main

Conversation

@harryjupiter148

@harryjupiter148 harryjupiter148 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What this changes

Introduces a 9-step modular typographic scale (--text-2xs through --text-3xl) defined as CSS custom properties with paired line-heights (--lh-*) and default font weights (--fw-*) in globals.css. Replaces all one-off font size literals across globals.css and charts.module.css, unifies hero display typography under fluid clamp(), introduces a --measure token (65ch) with a .prose utility for long-form reading layouts, and documents the scale and contributor usage guidelines directly in :root.

Why

Font sizes were scattered across stylesheets as ad-hoc, uncoordinated literals (0.92rem, 0.78rem, 1.05rem, multiple inconsistent clamp() rules), resulting in a gradual loss of vertical rhythm and typography hierarchy. Establishing fixed steps for body/UI and fluid tokens for display ensures visual consistency and maintainability before upcoming dense dashboard components land.

How it was verified

  • Static regex grep audit across the entire codebase confirming zero literal font-size declarations remain (font-size: \s*([\d.]+rem|[\d.]+px|clamp\([^)]+\)) returns 0 matches).
  • Visual and structural inspection of updated component and global styles across landing hero, pillars, trust badges, charts, data tables, and SVG axis/gauge elements.
  • Existing tests pass
  • New tests cover the change
  • No change to a public contract interface, or a migration note is included

Risk

Low. This is a purely visual CSS refactoring touching only presentation layers (global layout, typography tokens, and chart styling). No authentication, contract logic, wallet interaction, or state management code was modified. Minor sub-pixel text metric shifts (≤1px) may occur on chart SVG labels and table elements due to scale normalization.

Related Issues

Closes #69

@joelpeace48-cell

Copy link
Copy Markdown
Contributor

@harryjupiter148 , please fix failing ci

harryjupiter148 and others added 2 commits August 27, 2026 17:18
axe-core fails CI on any route with no <h1>. All seven inner pages
were using <h2> as their top-level heading. Promoting each to <h1>
clears the WCAG page-has-heading-one rule. globals.css updated to
cover .section h1 alongside the existing h2 rule so styling is
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

design-system: establish a typography scale

2 participants