also called card stack · sticky stack
One property on a list. Each item sticks at the same offset so later items slide over earlier ones and the stack builds itself. No library, no measurement, no scroll listener. One property builds the pile: every card is sticky at nearly the same place, so each one that arrives stops over the last, five pixels lower, and the deck’s edge grows down the table. The deal itself is the card’s own view timeline, finished before it sticks; the glint across the gold leaf rides the same timeline.
How it is built
.card { position: sticky; top: calc(var(--bar) + 6svh + var(--i) * 5px); /* each lands a little lower */
view-timeline: --land }
.face { animation: deal linear both; animation-timeline: --land;
animation-range: cover 0% cover 48% } /* dealt in before it sticks */In full, on GitHub index.html showcase.css
Cards — the Visconti-Sforza tarot, the Pierpont Morgan–Bergamo deck, about 1451 (the Morgan Library & Museum, the Accademia Carrara and the Colleoni family), public domain, via Wikimedia Commons: Fool, Magician, Popess, Empress, Emperor, Pope, Lovers, Chariot, Justice, Hermit, Wheel of Fortune, Strength, Hanged Man, Death, Temperance, Star, Moon, Sun, Judgement, World. Facts — Visconti-Sforza tarot deck.