Not published yet

The Progress Bar That Needs No JavaScript

That reading bar at the top of a blog is usually a scroll listener doing arithmetic every frame. Four lines of CSS delete it — you make the scrollbar the clock.

Publishing Friday morning · November 27, 2026
The Progress Bar That Needs No JavaScript

You pasted a scroll-progress bar from a tutorial and it works — until you try to change it and face a wall of scrollTop / scrollHeight / clientHeight arithmetic. This reads that script out loud, then deletes it: with ‘animation-timeline: scroll()’ the browser makes the scrollbar the animation’s clock, no listener and no maths. It builds the whole-page bar, then an article-only version with ‘view-timeline’ and ‘animation-range’, shows the one line whose absence silently breaks it, and an ‘@supports’ fallback — every step measured in headless Chromium (450px at exactly half scroll), not just checked that it parses.

The Progress Bar That Needs No JavaScript | Vibecodes