View Timeline Scale
The block grows as it crosses the lower half of the frame: starting at 70% and transparent at the bottom edge, it is only full-size and opaque when its centre reaches the middle — 183 px of scrolling for an 87 px block in a 280 px frame. animation-timeline: view(), range entry → cover 50%, CSS only.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Scroll has 74 effects, including 12 free. Explore the category →
3 usage examples



How it works
Five 260 px .sb-viewscale-box blocks stacked in the .sb-viewscale-content tray, itself inside the 280 px .sdc-scroll-container area. Each block gets transform: scale(.7); opacity: 0, the fx0546ScaleIn keyframe (back to scale(1) and opacity: 1) and animation-timeline: view(). What makes the effect is the range: animation-range: entry cover 50%. It starts the moment the top of the block touches the bottom of the area and runs to the halfway point of cover, the full crossing of the frame.
Halfway through cover is the moment the block's centre sits at the centre of the area. The trip is therefore (area height + block height) ÷ 2 long: 183 px here, 235 px for a 110 px card in a 360 px area. The result shows on load, before anything is touched: block 1 is full, block 2, midway, measures 52% opacity and scale .86, block 3 waits below the edge. While scrolling there are always two or three blocks at different sizes in the lower half: a gradient of sizes sliding by, not a pop.
Two construction details matter. The tray has 100 px of bottom padding, not 60: without it the last block could never climb to the middle and would stay stuck partway (measured with the padding: last block full at the end of travel, at 425 px). And transform does not move the neighbours: a block at 70% leaves a wider gap around it, which closes as it grows. Past the middle the block stays full until it leaves; scrolling back up undoes the path the other way.
Accessibility
- Reduced motion: with
prefers-reduced-motion: reducethe scale is removed (transform: none) and thefx0546Fadekeyframe keeps opacity only. Blocks in the lower half are paler, at their size (measured: block 2 at 52% opacity, no transform). The bottom hint stops pulsing andscroll-behaviorgoes back toauto. - Legibility on the way: a block midway is both reduced and half transparent. Its secondary text, already quiet, falls below contrast thresholds until it reaches the middle. Do not put in these blocks anything that must be read without scrolling; or raise the starting point (
opacity: .4instead of 0). - Keyboard and screen readers: the area is reachable with Tab (
tabindex="0", violet outline), announced as a named region, then scrolls with the arrow keys — checked in Chromium, Firefox and WebKit, which did not stop on it without that attribute. Blocks that are still transparent are read normally: opacity does not take them out of the accessibility tree. - Touch: native finger scrolling (a 150 px drag measured with Chromium touch emulation). On a small screen keep the area tall enough: below twice a block's height, nearly everything in view is growing and nothing is at its size.
Browser compatibility
No JavaScript, no dependency. Everything rests on animation-timeline and animation-range, supported from Chrome 115, Edge 115 and Safari 26; MDN lists Firefox 159. Identical values read in Chromium 149 and WebKit 26.5 (block 2 at .52 at rest, block 3 at .57 after 120 px). Firefox 151, the only Firefox version available for the test, does not know the property and shows the five blocks full; versions 159 and later remain to be checked.
The reduced, transparent state is written inside @supports (animation-timeline: view()). A browser without scroll timelines skips the whole set of rules: it shows a plain list of five blocks at their size, which scrolls. The only visible difference is the 100 px padding at the bottom of the tray, which then serves no purpose.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0546-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="sb-viewscale-content">
<div class="sb-viewscale-box">
<h4>…</h4>
<p>…</p>
</div>
… ×5
</div>
</div>
<span class="sdc-scroll-hint" aria-hidden="true">…</span>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
End of the range (CSS — animation-range: entry cover 50%) |
cover 50%: full at the middle of the frame | cover 30% finishes lower, in the bottom third; cover 70% requires climbing above the middle. Adjust the tray's bottom padding to match, or the last blocks will not finish. |
Tray bottom padding (CSS — .sb-viewscale-content { padding: 60px 20px 100px }) |
100 px | Rule of thumb: at least (area height − block height) ÷ 2. For a 360 px area and 110 px cards, 125 px minimum. Below that the last block stops before it is full. |
Starting scale and opacity (CSS — scale(.7), opacity: 0) |
.7 and 0 | scale(.85); opacity: .35 keeps the lower blocks readable; scale(.5) pushes the depth effect. Opacity alone (scale 1) gives a list that lights up as it climbs. |
Area height (CSS — .sdc-scroll-container { height: 280px }) |
280 px | The taller the area, the longer the trip: 360 px gives 235 px of growth for a 110 px block. With no height and no overflow-y, the window acts as the frame and the block is full at mid-screen. |
Block width (CSS — .sb-viewscale-box { width: 260px }) |
260 px, centred | At full width (width: auto, tray on align-items: stretch) the shrinking shows on the sides too: allow a side margin of at least 15% so the block at 70% does not look detached. |
Curve (CSS — animation-timing-function: linear) |
linear | ease-out does most of the growing in the first third of the trip and leaves a long, nearly full plateau; ease-in keeps the block small for long, then grows it near the middle. |
FAQ
animation-range — and, in this direction, by adding the bottom padding.cover 50% range requires the block's centre to reach the centre of the frame. Give the tray a bottom padding of at least (area height − block height) ÷ 2; the sold code uses 100 px for its 87 px blocks in 280 px.cover range and three keyframes (small, full at 50%, small): that is a different animation, which this page does not supply.