Skip to content

Map .subheadline to a body token, not a title one - #551

Draft
Ceylo wants to merge 1 commit into
skiptools:mainfrom
Ceylo:fix/subheadline-body-token
Draft

Ceylo wants to merge 1 commit into
skiptools:mainfrom
Ceylo:fix/subheadline-body-token

Conversation

@Ceylo

@Ceylo Ceylo commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What

.subheadline maps to titleSmall, which is Medium (500); iOS draws it at the regular weight. This maps it to bodyMedium: the same 14/20sp, regular weight, and the token .callout already uses.

Before / after

Showcase → Text. Fuse; Lite is pixel-identical.

iOS 26.5 before after

Measured, not eyeballed: ink per pixel of text width on the Font.subheadline row goes from 8.9 to 7.2. For scale, .body (regular, 16sp) is 7.8 and .headline (medium, 16sp) 9.7.

Side effects

  • Height unchanged (testTextSizeSubheadline still passes; the row is 43 px in both arms).

  • bodyMedium's letter spacing is 0.25sp rather than 0.1sp, so text sets slightly wider and can rewrap. The playground's long subheadline paragraph keeps its 3 lines but moves one word:

    before after
  • Nothing else in skip-ui uses .subheadline. Every other row on the two captured screens (top and bottom of the Text playground) is pixel-identical.

  • Apple platforms: none (#if SKIP).

Verified

  • swift test: 119 Swift tests, 54 skipped, 0 failures. JUnit: 163, 158 passed, 5 skipped.
  • New testSubheadlineIsRegularWeight; with main's Font.swift it fails on its own assertion (FontWeight(weight=400) != FontWeight(weight=500)).
  • Showcase through Gradle, Lite and Fuse, API 37 emulator, before and after; iOS on an iPhone 17 simulator (iOS 26.5).

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable). No API change, so no paired PR.
  • OPTIONAL: I have added an example of any UI changes to the Showcase sample app. Not needed: the Text playground already has .subheadline rows.

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Written with Claude Code. Every claim above comes from a run: the mutation run, and the Showcase on an emulator before and after with pixel diffs and the ink measurement, and on a simulator.

titleSmall and bodyMedium share 14sp/20sp, so sizes are unchanged, but
titleSmall is Medium (500) where iOS's subheadline is regular. Text set in
.subheadline therefore read heavier than its iOS counterpart. bodyMedium is
the token .callout already uses. Its letter spacing is 0.25sp rather than
0.1sp, so the text sets slightly wider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cla-bot cla-bot Bot added the cla-signed label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant