Generate CSS for the modern scroll-driven animations APIs: animation-timeline: scroll() for progress tied to scroll position, and animation-timeline: view() for progress tied to an element entering and leaving the viewport. Pick the timeline source, axis, animation-range, and watch it run in a sandboxed iframe.
@supports so non-supporting browsers see your fallback styles (e.g. opacity: 1 by default) instead of getting stuck on frame 0.
Use scroll(<axis>, <scroller>) when the timeline should track the page's scroll progress — a top-of-page progress bar, a horizontally-scrolling parallax stage. Use view(<axis>, <inset>) when each instance of the animated element should run as that element moves through the viewport — a "fade up on entry" pattern, sticky-scroll storytelling, sequenced reveals. The animation-range values are different too: scroll() ranges are 0%–100% of scroll, while view() ranges use the cover/contain/entry/exit phases that describe an element's relationship with the viewport.