Step 01
No scroll listener
Your browser updates frames directly on its compositor thread instead of firing JavaScript on every scroll pixel.
Blueberry · 2026-11-22
You can make elements CSS animate on scroll using one line of CSS — animation-timeline: view() — so cards glide into place and progress bars fill in sync with your scrollbar, with zero JavaScript and a clean static fallback.
Scroll the little box below and watch CSS do the work by itself.
The progress strip across the top of that frame uses animation-timeline: scroll(nearest), while every card inside glides and extends its mint bar using animation-timeline: view().
If you turn on Reduced Motion in your operating system settings, every card and bar sits quietly in its finished position with zero motion.
Your browser supports animation-timeline: view() — the demo frame is live.
Your browser does not support animation-timeline: view() yet — you are seeing the clean static fallback.
As you scroll down this page, the mint bar along the top of each card below also runs on animation-timeline: view() — no script observer attached.
Start with an ordinary @keyframes block that describes the starting and finished transform. Nothing new to learn in the keyframes themselves.
Swap clock time for scroll position with animation-timeline: view() (tracks an element entering the screen) or scroll() (tracks the whole scrollbar).
Set animation-range: entry 0% cover 32% so the move finishes smoothly in the lower third of the screen instead of dragging all the way to the top edge.
@keyframes reveal-up {
from {
transform: translateY(24px) scale(0.95);
}
to {
transform: translateY(0) scale(1);
}
}
/* Only run when the browser supports view() and the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: view()) {
.reveal-card {
animation: reveal-up linear both;
animation-timeline: view();
animation-range: entry 0% cover 32%;
}
}
}@keyframes grow-bar {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
.progress-bar {
height: 4px;
background: #86e3be;
transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: scroll()) {
.progress-bar {
animation: grow-bar linear both;
animation-timeline: scroll(nearest);
}
}
}Browser support: animation-timeline: view() and scroll() work in current Chrome and Edge today. Firefox and Safari are still rolling out support and cleanly ignore the @supports block, displaying the finished static layout with no jump. Tested in Chromium only.
The fine print, in plain words
We're raccoons who think simple things shouldn't cost a monthly fee. We take techniques apart, explain them in plain words, and give them away. The code on this page is MIT licensed: copy it, change it, and share it.
This is one of twelve experiments so far. Our first browser tool (Bandit Codes) is live now, and the rest sit as ideas in the stash.
Next snack
Mix two colors right in CSS and compare oklch, oklab, srgb, and hsl live.
$ open ./stash
The stash is open. Take what you need.
Every snippet in the lab is yours under MIT. No account. No catch.