Motion demo // Scale shift
Scale and position change in sync without custom keyframe files.
Scale-shift actuators map scroll or view timelines to transform intensity, creating card zoom, gallery emphasis and parallax effects with a single attribute rather than bespoke CSS per page.
Act I // Timeline-to-transform mapping
Map scroll or view timelines to transform intensity with animation-range tokens.
The CSS scroll-driven animation API lets us bind scale, translateY and rotate to the scroll position. Range tokens define entry/exit thresholds so the effect starts and ends precisely.
<!-- scale up as element enters viewport --> <article vl-effect="scale-shift-up" vl-timeline="view" vl-range="entry"> Content </article> <!-- parallax drift on scroll --> <img src="hero.jpg" vl-effect="parallax" vl-timeline="scroll" vl-speed="slow" alt="Hero image" />
Act II // GPU-only properties
Only transform and opacity are allowed—no layout thrash, no repaints.
Scale-shift effects use exclusively compositor-safe properties. The browser promotes elements to their own GPU layer, keeping scroll-linked animations at 120fps even on mid-range devices.
[vl-effect~="scale-shift"] {
animation: vl-scale-shift linear;
animation-timeline: view();
animation-range: entry 0% entry 100%;
will-change: transform;
}
No layout properties.
Margin, padding, width and height are never animated in the scale-shift system.
Act III // Depth pairing
Combine scale with tonal elevation so depth looks physical.
As an element scales up, its surface token shifts to a lighter tonal tier and its shadow grows. The visual impression is that the element is physically rising from the page.
Scale ↑ → Tier ↑ → Shadow ↑
Three properties move together to create convincing physical depth.
Act IV // Applied scale shift
Ranges, performance limits and tonal pairing: three rules for every scale-shift effect.
Define scroll ranges, keep animations on GPU-safe properties, then pair with tonal elevation for physical depth.