#622 A reader's measures stay readable on a phone
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#622
- pull request
- state:merged
**The bug:** on a phone, a moment's reader printed measure values one character per line. On the national debt timeline's checkpoints, "$1,287,301,055,524.27 USD" ran down the right edge as a single column of characters. **The cause:** `.measure-list` is a grid of `max-content 1fr`. The longest label ("Treasury intragovernmental holdings balance") took about 300 of the 326 pixels. **The fix:** - The label column is `fit-content(40%)`, so long labels wrap. - Values get the rest of the width (`minmax(0, 1fr)`), with `overflow-wrap: break-word`, so they break only between words unless one word can't fit. - Wide readers look as before. **Tests:** `test/measures-browser.mjs` lays out a long label and a trillion-dollar value at phone width. It checks that the label takes at most 40% and the number stays on one line. It passes in Chromium, Firefox and WebKit, and fails on the old CSS (the label was 280px). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/622
Related
Open #622 A reader's measures stay readable on a phone in the timeline