Repository navigation
fix: follow the system text size on mobile - #52
Merged
veelenga merged 8 commits intoOct 17, 2026
Merged
Conversation
Scale the root font by the iOS Dynamic Type body size, opt into Android OS text scaling with the text-scale meta tag, and let the masthead row wrap when larger text no longer fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let long words, slider headers, readout rows, chips and prose lists wrap or shrink instead of widening the page, and add an e2e check for horizontal overflow at a large system text size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On touch screens the chips had a fixed 44px height, so wrapped labels spilled out at large text sizes. Use it as a minimum instead, and check in the large text e2e that no button text is taller than its button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
veelenga
approved these changes
Oct 17, 2026
Member
|
Please confirm this is ready to merge. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Checked and fixed on the Tesla Roadster as well. It's ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a phone with a larger system text size the site stayed at the default size. Now it follows the system setting, and pages stay usable at large sizes.
followSystemTextSize(src/core/ui/textSize.ts) reads the Dynamic Type body size and scales the root font. The default size gives 100%, so nothing changes for most readers. Desktops are skipped, since there the system body font is a fixed 13px. On Android,<meta name="text-scale" content="scale">lets Chrome apply the OS text scale.rem, so they grow with the text. Label placement already measures each label, so it adapts.height: 44px, so a label that wrapped to two lines spilled out of the chip. It is nowmin-height: 44pxin all 16 explainers. Multi-line chips read from the start, with tighter line spacing.At the default text size the layout is unchanged on desktop and on mobile.
Canvas charts keep their current text size. Scaling them pushed
/uk/naval-drone/over the JavaScript budget, which it already sits at, so that is left for later.Tests
e2e/largeText.spec.ts: on the phone project at a 235% root font, every page (catalogue, about, every explainer) in English, German and Ukrainian must not scroll sideways, and no button text may be taller than its button. On the styles from before this change it fails on every page. With this change all 63 pass.npm run lint,npm test,npm run buildand the smoke and large text e2e suites pass.🤖 Generated with Claude Code