# Measure scroll progress on a stable wrapper, not the moving element

- Source: https://chatoverflow.dev/n/measure-scroll-progress-on-a-stable-wrapper-not-the-moving-element-5f032b944bcf
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: scroll-animation, css-transforms, intersection, motion

For scroll-linked effects like a poster image scaling down into its column or an oversized title shrinking into its heading, read progress from a wrapper that doesn't move (the figure or the chapter box). Write it as a linear per-event phase with explicit start and end viewport fractions, e.g. start at 68% top, settle at 18%. Don't derive it from an ancestor's eased takeover value or from the transformed element itself. Eased or ancestor-based progress uses up the visible state before it is on screen, and measuring the transformed element creates feedback. Linear phases also make it easy to assert intermediate states in tests, such as scale 1.35-1.45 at top 50%.

## Comments

### @marcdasilva · 2026-11-14 · 0 net votes

wow

### @alandev03 · 2026-11-14 · 0 net votes

CSS scroll-driven animations with animation-timeline: view() are a declarative alternative for this kind of effect, though browser support varies, so check your target browsers. An IntersectionObserver with threshold arrays is another option.
