Skip to content

Add global letter-spacing and typography defaults#425

Merged
pedromenezes1 merged 3 commits intomainfrom
pedro/global-typography-defaults
Apr 17, 2026
Merged

Add global letter-spacing and typography defaults#425
pedromenezes1 merged 3 commits intomainfrom
pedro/global-typography-defaults

Conversation

@pedromenezes1
Copy link
Copy Markdown
Collaborator

@pedromenezes1 pedromenezes1 commented Apr 16, 2026

Aligns the docs site's base typography with the Dashboard's global defaults:

  • Add letter-spacing: -0.01em globally on html (matches Dashboard)
  • Add line-height: 1.5 globally on html
  • Add font-feature-settings: 'cv02', 'cv03', 'cv04', 'calt' for Inter's open numerals and contextual alternates
  • Remove invalid font-display: optional from html (only works inside @font-face)
  • Add tracking-tight to page titles (DocLayout, PageHeader, StickyDocHeader, Heading)
  • Reset letter-spacing and line-height in HomeGrid demo tiles so kumo components render with their own spacing
  • Add monospace tracking reset (letter-spacing: normal) for pre, code, kbd, .font-mono
Before After
Screenshot 2026-04-17 at 13 58 16 Screenshot 2026-04-17 at 13 58 19
Screenshot 2026-04-17 at 13 59 08 Screenshot 2026-04-17 at 13 59 09
Screenshot 2026-04-17 at 13 58 52 Screenshot 2026-04-17 at 13 58 53

  • Reviews
  • bonk has reviewed the change
  • automated review not possible because: typography/styling changes require visual review
  • Tests
  • Additional testing not necessary because: CSS-only changes with no logic, verified visually in dev server

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 16, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@425

commit: 0c3c3b0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Docs Preview

View docs preview

Commit: 9fff59d

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Visual Regression Report — 20 changed, 17 unchanged

20 screenshot(s) with visual changes:

Button / Variant: Secondary

161 px (0.16%) changed

Before After Diff
Before After Diff

Button / Variant: Ghost

164 px (0.16%) changed

Before After Diff
Before After Diff

Button / Icon Only

0 px (0%) changed

Before After Diff
Before After Diff

Button / Loading State

5 px (0%) changed

Before After Diff
Before After Diff

Button / Disabled State

0 px (0%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Select

130 px (0.13%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Combobox

130 px (0.13%) changed

Before After Diff
Before After Diff

Dialog (Open)

293,723 px (1.46%) changed

Before After Diff
Before After Diff

Select / Select Basic

300 px (0.3%) changed

Before After Diff
Before After Diff

Select / Select Without Label

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Placeholder

418 px (0.41%) changed

Before After Diff
Before After Diff

Select / Select With Tooltip

294 px (0.29%) changed

Before After Diff
Before After Diff

Select / Select Custom Rendering

414 px (0.41%) changed

Before After Diff
Before After Diff

Select / Select Loading

1,456 px (0.72%) changed

Before After Diff
Before After Diff

Select / Select Complex

720 px (0.61%) changed

Before After Diff
Before After Diff

Select / Select Disabled Options

829 px (0.82%) changed

Before After Diff
Before After Diff

Select / Select Disabled Items

176 px (0.17%) changed

Before After Diff
Before After Diff

Select / Select Grouped With Disabled

450 px (0.44%) changed

Before After Diff
Before After Diff

Select / Select Long List

1,428 px (1.21%) changed

Before After Diff
Before After Diff

Select (Open)

459,399 px (1.88%) changed

Before After Diff
Before After Diff
17 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Primary
  • Button / Variant: Destructive
  • Button / Variant: Outline
  • Button / Variant: Secondary Destructive
  • Button / Sizes
  • Button / With Icon
  • Button / Title
  • Dialog / Dialog With Actions
  • Dialog / Dialog Basic
  • Dialog / Dialog Alert
  • Dialog / Dialog Confirmation
  • Dialog / Dialog With Dropdown
  • Select / Select Sizes
  • Select / Select With Field
  • Select / Select Multiple
  • Select / Select Grouped

Generated by Kumo Visual Regression

@pedromenezes1 pedromenezes1 self-assigned this Apr 17, 2026
@pedromenezes1
Copy link
Copy Markdown
Collaborator Author

/bonk

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 17, 2026

I've reviewed all the changes in PR #425. Here's my analysis:

Summary

This PR aligns the docs site's base typography with the Dashboard's global defaults. The changes are clean, focused, and follow the project's conventions.

Changes Reviewed

1. global.css - Core typography changes

  • ✅ Added letter-spacing: -0.01em globally on html (matches Dashboard)
  • ✅ Added line-height: 1.5 globally on html
  • ✅ Added font-feature-settings: 'cv02', 'cv03', 'cv04', 'calt' for Inter's open numerals and contextual alternates
  • Correctly removed invalid font-display: optional from html (this only works inside @font-face)
  • ✅ Added monospace tracking reset (letter-spacing: normal) for pre, code, kbd, .font-mono

2. Component title updates - Added tracking-tight

  • Heading.astro - Headings now have tighter tracking
  • StickyDocHeader.tsx - Both sticky title instances
  • page-header.tsx - Page header h1
  • DocLayout.astro - Main page title

3. HomeGrid.tsx - Demo tile reset

  • ✅ Added tracking-normal leading-normal to demo tile wrapper (line 659) to reset global typography so kumo components render with their own intended spacing

Visual Regression Results

The visual regression report shows 27 screenshots with minor changes (mostly <1% pixel difference), which is expected and acceptable for typography adjustments. The changes are subtle and align with the Dashboard's design system.

Code Quality

  • Follows the project's CSS conventions
  • Properly resets typography in component demo areas to prevent unintended inheritance
  • Correctly fixes the invalid font-display property placement

This PR looks good to me and is ready to merge. The typography changes are well-considered and the implementation properly handles the cascade/reset pattern for component demos.

github run

@pedromenezes1 pedromenezes1 marked this pull request as ready for review April 17, 2026 13:04
@pedromenezes1 pedromenezes1 merged commit 87432f8 into main Apr 17, 2026
17 checks passed
@pedromenezes1 pedromenezes1 deleted the pedro/global-typography-defaults branch April 17, 2026 13:55
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.

2 participants