Scroll-driven Animation
I want the article's top progress bar to grow as I scroll down and shrink back when I scroll up, rather than playing on a timer once triggered.
animation-timeline: scroll() or view()). Unlike scroll-triggered animations that play to completion on a timer once visible, scroll-driven motion tracks scroll position 1:1. Always keep core text readable at every scroll offset, provide graceful fallback, and honor reduced motion.You can say this to an AI Agent
Ready to paste into Cursor, Claude Code, or CodexAdd a reading progress bar at the top of the article page using a scroll-driven animation: map vertical scroll progress 0%–100% directly to `transform: scaleX()` via CSS `animation-timeline: scroll()` with a lightweight fallback for unsupported browsers. Verify scrolling down, pausing midway, scrolling back up, and behavior under prefers-reduced-motion.
