#258 · Show a timeline's whole description under its title (#257)
- timeline-app
- pull request
Closes #257. The description under a timeline's title was a one-row ` ` that never grew, so a longer description scrolled inside it. - `src/app.ts`: `fitDescription()` sets the field's height to its text. It runs when the description is filled, as it's typed, and when its width changes, using a `ResizeObserver` that only watches the width so the height change doesn't loop. This works in Firefox, which doesn't support CSS `field-sizing` yet. - `src/styles.css`: the field has no scroll of its own. - `test/browser.mjs`: a long description is taller than 60 px and shows without scrolling. Passes in Chromium, Firefox and WebKit.
Sources
Open #258 · Show a timeline's whole description under its title (#257) in the timeline