Give scroll progress a clear boundary
A real browser study shows why a longer appendix changes a page-position bar. Choose the right measurement boundary, preserve navigation and make motion optional.

A thin bar at the top of a page looks like a simple piece of feedback. But what does its end mean: the bottom of the document, the end of the article, or a completed reading task? Decide that before choosing its color. For an editorial page, an honest position cue can help orientation without pretending to know what someone has understood.
Name the boundary before animating it
Our example labels the bar “Page position.” It follows the root scroller, including the article, appendix and footer. The article remains ordinary HTML with section links. The bar is an optional visual cue; it does not unlock content, mark a lesson complete or replace navigation.
A scroll progress timeline follows a scroller’s position along an axis. A view progress timeline follows a particular element as it moves through its scroller. These answer different questions. A section entering the viewport is not the same event as reaching the bottom of the document. Chrome’s timeline guide explains the distinction.
Choose the coordinate you need
Page or panel position
A scroll progress timeline measures movement through a scroll range.
- Use the root scroller for a whole-page indicator.
- For a nested panel, deliberately identify the panel’s scroller.
- Label the cue to match that boundary.
An element’s passage
A view progress timeline measures a subject relative to its scroller.
- Useful for effects associated with one section entering or leaving.
- Its range requires a separate design decision.
- It still does not establish whether the content was read.
Hold the reading position still; change the page
We placed an “article ends here” marker above a separate appendix. First, we scrolled that marker to a fixed point in the viewport. Then we increased the appendix’s minimum height by 600 CSS pixels. No text above the marker changed, and the scroll offset stayed fixed. The orange bar became shorter.
Standard appendix, 390 × 800 CSS px. The marker is visible while more page remains below it. Actual Chromium capture; the bar is driven by CSS.
Extended appendix, same viewport and scroll offset. Only the document’s remaining range grew. Notice the shorter orange bar at the top; the article-end marker stays put.Measured Chromium fixture results; percentages rounded to one decimal| Viewport | Fixed scroll offset | Range before → after | Bar before → after |
|---|
| 900 × 800 CSS px | 1,528 CSS px | 2,163 → 2,763 CSS px | 70.6% → 55.3% |
| 390 × 800 CSS px | 1,590 CSS px | 2,213 → 2,813 CSS px | 71.8% → 56.5% |
The result follows the geometry. In this ordinary vertical layout, progress is the scroll offset divided by the available scroll range: document height minus viewport height. The CSS Working Group draft defines the corresponding calculation, including an inactive timeline when that range is zero. See the scroll-progress definition.
For a design review, this gives you a useful question: does material after the article belong in its indicator? If it does, say “Page position.” If the intended boundary is one article, define and test an article-specific range. Do not rename a root-scroller bar “Article complete” while leaving a large recommendation section inside its measurement.
Keep the animation attached to scrolling
The fixture changes the bar’s horizontal scale from empty to full. Its animation uses a linear progression and an explicit root block-axis timeline. Keep the timeline declaration after the animation shorthand; the shorthand resets it. The snippet below assumes a styled track and a child fill element, as in the screenshots. Check the animation-timeline reference.
/* Hide the optional cue in the base design. */
.progress { display: none; }
.fill { transform-origin: left; }
@keyframes page-position {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
@supports (animation-timeline: scroll(root block)) {
@media (prefers-reduced-motion: no-preference) {
.progress { display: block; }
.fill {
animation: page-position auto linear both;
animation-timeline: scroll(root block);
}
}
}
Moving backward should move the indicator backward too. We checked the start, midpoint, end and a return to one-quarter of the range. In the tested Chromium 153.0.8010.12 and WebKit 26.6 builds, the computed scale followed those positions at both viewport widths. This verifies our fixture’s behavior, not a frame-rate improvement or a guarantee for every device.
Let the page work when the cue is absent
The tested Firefox 155.0 build did not support this timeline declaration, so the base design hid the bar. The content and section links remained usable. MDN currently marks animation-timeline as having limited availability; use a feature query and test your actual browser targets instead of assuming one successful capture establishes support. Review current compatibility.
We also hid the optional cue when reduced motion was requested, while keeping the article and its anchors. W3C’s C39 technique describes starting with static styles and adding motion only for no-preference. This is the approach used here; it is one design choice, not a claim that this small study proves full accessibility conformance. Read the reduced-motion technique.
Keyboard activation of the section link worked in all three tested engines, including reduced-motion checks. A separate Chromium run with JavaScript disabled also reached the section. The decorative bar is hidden from the accessibility tree; its meaning is not required to operate this page. A product that needs essential progress information would need a different semantic and interaction design.
Review the boundary in four passes
Write down the meaning
Name the scroller, axis and start/end conditions. Decide whether the footer, recommendations and other material belong in that range.
Challenge the geometry
Try a shorter article, a larger viewport and late content below it. Check what the indicator says when no scrolling is needed.
Move in both directions
Check the start, a middle position, the end and a backward move. Include keyboard navigation rather than relying only on a trackpad.
Remove the enhancement
Check an unsupported browser, reduced motion and JavaScript disabled. Keep reading, section links and focus usable without the bar.
The review artifact should include the page at a known position and a sentence explaining the measured boundary. That makes the visual easy to judge: the reader sees where they are in a defined space, while the product avoids turning a scroll coordinate into a claim about completion.
Back to the LOOKFILE blog