A staggered list used to acquire a little JavaScript almost by reflex: count the children, assign an index, calculate a delay. Today the element can ask CSS where it sits among its siblings. The interesting change is not a new way to draw a bouncing ball. It is that more everyday animation plumbing can disappear. [1] [2]
I built six small, working examples and two matched browser experiments. The demos below contain HTML and CSS, with no scripts. The measurements compare that approach with small native JavaScript implementations, including the Web Animations API—not an animation library added just to make CSS look good. The results support less application JavaScript, not a blanket claim that CSS makes every rendering stage faster. [3]
What is actually new—and what is not
As checked on November 30, sibling-index() and sibling-count() are Baseline Newly available, with the August 2026 cross-browser milestone documented by MDN and web.dev. MDN now marks random() Newly available since November 2026, with a warning that parts of its syntax have different support. Newly available means recent core-browser interoperability; it does not mean every installed browser supports it. [1] [2] [4] [5]
Other ingredients have longer histories. counter() has a Widely available label dating to July 2015; that is a compatibility milestone, not its invention date. The fit-content keyword is widely available since November 2021. @property reached Baseline in July 2024, and linear() easing has broad support dating to December 2023. The renaissance comes from combining these pieces, not relabeling all of them as 2026 inventions. [6] [7] [8] [9]
| Feature | Useful job | Deployment note |
|---|---|---|
| sibling-index() / sibling-count() | Order-aware delay and count-aware formulas | Newly available, August 2026; keep static fallbacks |
| random() | Bounded decorative variation | Newly available, November 2026; syntax subsets vary |
| attr() + type() | Read typed HTML data into CSS values | Check advanced syntax, not the old generic attr() label |
| @property + counter() | Interpolate a number and format its visible label | Older foundations; generated labels need accessible context |
| if() | Choose a property value from media/style/support conditions | Still Limited availability; keep a preceding fallback |
| interpolate-size / calc-size() | Animate a length toward an intrinsic size | Still Limited availability; leave the disclosure usable |
| scroll() / view() | Connect animation progress to scrolling or visibility | Scroll-driven animations reached Baseline in October 2026 |
| linear() | Piecewise custom easing, including overshoot | Established easing tool; no spring simulator required |
No matching rows.
1. Stagger a real list without assigning indices
sibling-index() is one-based. Subtract one if the first item should start immediately. Multiply the result by a time, and the browser derives every animation delay from the DOM. In the live example, the five cards start at 0, 80, 160, 240 and 320 milliseconds. I checked those computed values in all three test engines. [1] [3]
Use the checkbox to play the reveal; uncheck it to reset. Cards remain visible if the feature is missing, and reduced-motion users get the final state. This is useful for a menu, a short results list or onboarding steps. Avoid keeping essential content invisible while a long entrance sequence plays. [3]
CSS
@supports (animation-delay: calc((sibling-index() - 1) * 80ms)) {
#play:checked ~ .stage .tile {
animation: arrive 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: calc((sibling-index() - 1) * 80ms);
}
}
@keyframes arrive {
from {
opacity: 0;
transform: translateY(18px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
HTML
<input id="play" type="checkbox" /><label for="play"
>Play stagger / uncheck to reset</label
>
<div class="stage">
<ol class="tiles">
<li class="tile">Plan</li>
<li class="tile">Build</li>
<li class="tile">Review</li>
<li class="tile">Ship</li>
<li class="tile">Learn</li>
</ol>
</div>
<p class="note">
Static cards are the fallback. Motion starts only when you choose it.
</p>
JavaScript alternative
// The old indexing step; the CSS animation still does the drawing.
const tiles = document.querySelectorAll(".tile");
tiles.forEach((tile, index) => tile.style.setProperty("--index", index));
// The stylesheet would use: animation-delay: calc(var(--index) * 80ms).
DOM order is a constraint, not a magic filter
These functions count element siblings, not “the elements matching my .tile selector.” A hidden element still exists in that sibling list; a heading or an extra wrapper changes the numbers. Put the animated items under a dedicated parent. A React Fragment does not add an element, but an actual wrapper does. Do not use the visual index as a business identifier. [1] [2]
CSS recalculates the relationship when the structure changes. That removes an index-maintenance task; it does not remove the DOM or style work caused by adding items. For huge, frequently reordered lists, measure that workload rather than extrapolating from a five-card example. [1] [3]
2. Keep the total stagger bounded with sibling-count()
An 80ms step works for five cards and becomes tedious for fifty. Normalize the index over the available siblings instead: 600ms × (index − 1) / max(1, count − 1). The last card then starts at 600ms regardless of the list length. A one-card list starts at zero without dividing by zero. The six-card demo resolves to 0, 120, 240, 360, 480 and 600ms. [2] [1] [3]
This is a useful difference from merely generating an nth-child rule per item. The formula describes a relationship that remains true when the content changes. It is still a design choice: a short list may look better with a fixed step, and a long list may not need entrance motion at all. [3]
CSS
@supports (
animation-delay: calc(
600ms * (sibling-index() - 1) / max(1, sibling-count() - 1)
)
) {
#play:checked ~ .stage .tile {
animation: wave 450ms ease-out both;
animation-delay: calc(
600ms * (sibling-index() - 1) / max(1, sibling-count() - 1)
);
}
}
@keyframes wave {
from {
opacity: 0.3;
transform: translateY(18px) scale(0.92);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
HTML
<input id="play" type="checkbox" /><label for="play">Play six-card wave</label>
<div class="stage">
<ol class="tiles">
<li class="tile">1</li>
<li class="tile">2</li>
<li class="tile">3</li>
<li class="tile">4</li>
<li class="tile">5</li>
<li class="tile">6</li>
</ol>
</div>
<p class="note">
Every last card starts at 600ms. A one-card list divides by max(1, count − 1),
so it stays valid.
</p>
JavaScript alternative
const tiles = [...document.querySelectorAll(".tile")];
const steps = Math.max(1, tiles.length - 1);
tiles.forEach((tile, index) => {
tile.style.animationDelay = `${(600 * index) / steps}ms`;
});
// Run again after additions/removals if you keep this imperative version.
3. Turn HTML data into a typed counter and progress animation
type() is not a free-standing “convert anything” animation function. In attr(), it declares how an HTML attribute should be parsed. Here, the typed attr() call reads a project’s numeric target from the element itself, parses it as an integer and uses zero as its fallback. This is a different capability from the old content: attr(data-label) use case. Do not use the generic attr() compatibility label as proof that typed values work everywhere. [10] [11]
@property registers –progress as an integer, with an initial value and inheritance behavior. A keyframe can then interpolate it. The fill converts that value to a scale, while counter-reset and counter() turn the integer into visible text. counter() returns a formatted string; it is not a replacement numeric input for calc(). [8] [6]
The checked demo finishes with –progress equal to 72, a counter value of 72 and a horizontal scale of 0.72 in Chromium, Firefox and WebKit. The accessible label always says “Project progress: 72 percent”; the rapidly changing visual label is hidden from assistive technology. This illustrates a known value, not a live measurement or a fake loading indicator. [3]
CSS
@property --progress {
syntax: "<integer>";
inherits: true;
initial-value: 0;
}
.meter {
--progress: 72;
max-width: 620px;
}
.track {
height: 22px;
background: #e2e8f0;
border-radius: 6px;
overflow: hidden;
}
.fill {
display: block;
height: 100%;
background: #1d4ed8;
transform-origin: left;
transform: scaleX(calc(var(--progress) / 100));
}
.count {
counter-reset: amount var(--progress);
display: block;
font:
32px/1.6 ui-monospace,
monospace;
}
.count::after {
content: counter(amount) "%";
}
@supports (opacity: attr(data-progress type(<number>), 0)) {
.meter {
--target: attr(data-progress type(<integer>), 0);
--progress: var(--target);
}
#play:checked ~ .stage .meter {
animation: count-up 1400ms ease-out both;
}
}
@keyframes count-up {
from {
--progress: 0;
}
to {
--progress: var(--target);
}
}
HTML
<input id="play" type="checkbox" /><label for="play"
>Animate project progress</label
>
<div class="stage">
<div
class="meter"
data-progress="72"
role="img"
aria-label="Project progress: 72 percent"
>
<span class="label">Project progress · 72%</span>
<div class="track" aria-hidden="true"><span class="fill"></span></div>
<span class="count" aria-hidden="true"></span>
</div>
</div>
<p class="note">
The accessible label gives the real value. The changing number is decorative,
not a live region.
</p>
JavaScript alternative
const meter = document.querySelector(".meter");
const target = Number(meter.dataset.progress) || 0;
const fill = meter.querySelector(".fill");
const number = meter.querySelector(".count");
const duration = 1400;
const start = performance.now();
function frame(now) {
const t = Math.min(1, (now - start) / duration);
const progress = Math.round(target * (1 - (1 - t) ** 3));
fill.style.transform = `scaleX(${progress / 100})`;
number.textContent = `${progress}%`;
if (t < 1) requestAnimationFrame(frame);
}
if (!matchMedia("(prefers-reduced-motion: reduce)").matches) {
requestAnimationFrame(frame);
}
// Illustrative imperative alternative; not used in the matched benchmark.
A typed value is not automatically a cheap value
Changing text can require paint, and animating an inherited custom property can require style work. The registered-property counter is a good example of why “no JavaScript” and “compositor-only” are separate questions. If only the bar needs motion, animate its transform and leave the label static. Keep critical facts in real text or semantic HTML rather than relying only on generated content. [8] [6] [12]
4. Open a disclosure to its content size
The common JavaScript version measures scrollHeight, writes an explicit pixel height, handles the next change, and eventually clears that height so content can resize. interpolate-size: allow-keywords enables a transition between a numeric size and an intrinsic keyword such as auto. Scope the opt-in to the component: it inherits, so a root declaration affects descendants too. [13]
The live example uses a real details/summary disclosure and animates its ::details-content region where the intrinsic-size path is supported. The content-visibility transition uses allow-discrete so closing content can remain visible through the exit. Where the path is absent, the native disclosure still opens and closes; the enhancement is motion, not access to the answer. [13] [3]
CSS
details {
border: 1px solid #93c5fd;
border-radius: 6px;
background: white;
}
summary {
padding: 16px;
font-weight: 650;
}
.answer {
padding: 0 16px 16px;
}
.answer p {
margin: 0 0 12px;
}
@supports (interpolate-size: allow-keywords) {
details {
interpolate-size: allow-keywords;
}
details::details-content {
block-size: 0;
overflow: clip;
transition:
block-size 0.4s ease,
content-visibility 0.4s allow-discrete;
}
details[open]::details-content {
block-size: auto;
}
}
HTML
<div class="stage">
<details>
<summary>What does the shipping plan include?</summary>
<div class="answer">
<p>A content review, keyboard checks and a small production release.</p>
<p>
The content can wrap or grow. No JavaScript reads scrollHeight or writes
a measured pixel height.
</p>
</div>
</details>
</div>
<p class="note">
Unsupported browsers keep a working native disclosure and open it instantly.
</p>
JavaScript alternative
// A measurement-based pattern for a custom disclosure panel.
// The trigger must also maintain expanded state and keyboard semantics.
const panel = document.querySelector(".panel");
function setExpanded(expanded) {
panel.style.height = `${panel.getBoundingClientRect().height}px`;
requestAnimationFrame(() => {
panel.style.height = expanded ? `${panel.scrollHeight}px` : "0px";
});
}
// Production code must handle interruptions, reduced motion and content changes.
Where fit-content() and calc-size() belong
Keep the names separate. fit-content, without parentheses, is an intrinsic sizing keyword. fit-content(20rem) is a function with a limit, commonly used for a grid track. Neither is a new animation clock. For this disclosure, auto is the appropriate target; replacing it with a fixed maximum can produce clipping or an oddly paced reveal. [7] [14] [13]
Use calc-size() when you actually need arithmetic involving an intrinsic size—for example calc-size(fit-content, size * 0.7). Ordinary calc() cannot do that calculation on the keyword. MDN recommends interpolate-size when you only want the transition and do not need intrinsic arithmetic. Both remain Limited availability in the documentation checked for this article. Animating a height still changes layout; CSS does not make that cost vanish. [15] [13]
/* A separate compact-label example, not the disclosure above. */
.label {
inline-size: fit-content;
}
@supports (inline-size: calc-size(fit-content, size * 0.7)) {
.label:hover,
.label:focus-visible {
inline-size: calc-size(fit-content, size * 0.7);
}
}
5. Follow the reading position without a scroll listener
scroll() connects an animation timeline to a scroll container. view() is the related tool for progress through an element’s visibility in a scrollport. web.dev’s October 2026 platform report identifies scroll-driven animations as Newly available after Firefox 159 joined the existing Chrome and Safari implementations. [16]
The scrollable panel below has a sticky progress bar. Its transform runs from zero to one on scroll(nearest block), so it follows the panel rather than the whole page. Resetting animation-timeline after the animation shorthand matters: the shorthand resets timeline-related values. Keyboard users can focus the region and scroll it normally. [16] [3]
CSS
.scroller {
height: 340px;
overflow: auto;
position: relative;
border: 1px solid #93c5fd;
background: white;
border-radius: 6px;
}
.scroller article {
padding: 12px 20px;
}
.progress {
display: none;
position: sticky;
top: 0;
height: 5px;
background: #1d4ed8;
transform-origin: left;
z-index: 1;
}
@supports (animation-timeline: scroll()) {
.progress {
display: block;
animation: progress linear both;
animation-timeline: scroll(nearest block);
}
}
@keyframes progress {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}
HTML
<div
class="scroller"
tabindex="0"
role="region"
aria-label="Scrollable reading sample"
>
<div class="progress" aria-hidden="true"></div>
<article>
<h2>Scroll inside this panel</h2>
<p>
Section 1. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 2. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 3. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 4. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 5. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 6. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 7. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 8. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 9. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
<p>
Section 10. Good animation follows the task. The browser already knows
where this scroll container is. CSS can use that position directly,
without asking a scroll listener to calculate it again.
</p>
</article>
</div>
<p class="note">
The bar appears only where scroll-driven animations are supported. Text
remains readable everywhere.
</p>
JavaScript alternative
const scroller = document.querySelector(".scroller"),
bar = document.querySelector(".progress");
let queued = false;
function update() {
const max = scroller.scrollHeight - scroller.clientHeight;
bar.style.transform = `scaleX(${max ? scroller.scrollTop / max : 0})`;
queued = false;
}
scroller.addEventListener(
"scroll",
() => {
if (!queued) {
queued = true;
requestAnimationFrame(update);
}
},
{ passive: true },
);
update();
6. Add restrained variation with random() and if()
random() can select a time, angle or length inside a bounded range. In this example it varies the lift and duration of decorative dots, then runs only two passes after the reader opts in. Random values are cached according to their sharing rules; writing random() is not a request for fresh noise on every animation frame. A custom property containing the function is token substitution, not necessarily a single frozen numeric result shared by every consumer. [5]
Use a named random key and the appropriate sharing scope when two properties must share a random base. For repeated or reproducible states, keep explicit values instead of expecting random() to behave as a seeded application-state system. Do not randomize meaningful data, reading order or text contrast. [5]
if() chooses a value using a style, media or support condition. The demo uses the media branch to select an 800ms duration below 480px; otherwise it keeps the per-dot duration. It still has an ordinary fallback and an independent reduced-motion rule. if() does not run arbitrary JavaScript expressions, fetch data or replace application state. Its semicolon-separated branches are not Sass if() syntax. [17] [3]
CSS
.dots {
display: flex;
gap: 12px;
align-items: center;
min-height: 90px;
flex-wrap: wrap;
}
.dots i {
display: block;
width: 24px;
height: 24px;
background: #0284c7;
border-radius: 50%;
--lift: -12px;
--time: 1200ms;
}
@supports (animation-duration: random(800ms, 1600ms)) {
.dots i {
--lift: random(-24px, -8px);
--time: random(800ms, 1600ms);
}
#play:checked ~ .stage .dots i {
animation: drift var(--time) ease-in-out 2 alternate;
}
}
@keyframes drift {
to {
transform: translateY(var(--lift));
}
}
@supports (animation-duration: if(media(width < 480px): 800ms;else: 1200ms)) {
#play:checked ~ .stage .dots i {
animation-duration: if(media(width < 480px): 800ms;else: var(--time));
}
}
HTML
<input id="play" type="checkbox" /><label for="play"
>Play a restrained decorative drift</label
>
<div class="stage">
<div class="dots" aria-hidden="true">
<i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i
><i></i>
</div>
</div>
<p class="note">
Decorative dots only. A deterministic, still layout is the fallback. Values
are sampled, not a new random frame every tick.
</p>
JavaScript alternative
const narrow = matchMedia("(width < 480px)");
for (const dot of document.querySelectorAll(".dots i")) {
const duration = narrow.matches ? 800 : 800 + Math.random() * 800;
const lift = -24 + Math.random() * 16;
dot.animate(
[{ transform: "translateY(0)" }, { transform: `translateY(${lift}px)` }],
{ duration, direction: "alternate", iterations: 2, easing: "ease-in-out" },
);
}
// An illustrative native-JS alternative; reduced-motion handling is required.
One more useful function: linear() easing
linear(), the function, is different from the linear timing keyword. It interpolates between supplied progress points, which can approximate an overshoot or spring-like curve without shipping a spring solver. It is an established tool, not a new 2026 release. A sampled curve also does not behave like a physical spring that reacts continuously to new forces or a dragged pointer. [9]
.card {
transition: transform 420ms linear(0, 0.8 55%, 1.06 75%, 1);
}
.card:is(:hover, :focus-visible) {
transform: translateY(-4px);
}
@media (prefers-reduced-motion: reduce) {
.card {
transition: none;
}
}
What the sandbox browsers actually supported
I tested the fixtures in Chromium 159.0.8154.6, Firefox 159.0 and a WebKit build with a Safari 27.2 user-agent. These are automation engine builds, not a certification of the current retail browser releases or every mobile device. The Firefox snapshot is especially useful: it supports the sibling functions, typed attr() and scroll timelines, but not random(), if() or intrinsic-size interpolation. That does not contradict a later November Baseline milestone for random(); an installed build can lag the newest interoperable set. [3] [5]
All six demos were exercised in those three engines and at a 480px Chromium viewport. The unsupported Firefox enhancements fell back without removing content. A separate reduced-motion pass found no running animations in any demo. The checks confirmed no horizontal document overflow, the 72% meter endpoint and the scroll indicator’s end state; a tiny Firefox transform rounding difference was evaluated with a 0.001 tolerance. [3]
| Feature | Chromium 159 | Firefox 159 | WebKit build |
|---|---|---|---|
| sibling-index() / sibling-count() | Yes | Yes | Yes |
| Typed attr() / type() | Yes | Yes | Yes |
| scroll() timeline / linear() easing | Yes | Yes | Yes |
| random() | Yes | No | Yes |
| if() | Yes | No | Yes |
| interpolate-size / calc-size() | Yes | No | Yes |
No matching rows.
The performance experiment: fair JavaScript, same output
For the first pair, I made the same 120-card page twice. The CSS version uses sibling-index() for an 8ms stagger. The JavaScript version calls Element.animate() once per card with the same 600ms duration, delay, easing, opacity and transform keyframes. Both use native browser animation machinery. At a shared animation time of 400ms, all 120 computed opacity and transform states matched exactly. The live five-card demo uses a slower 80ms stagger for readability; it is not the 120-card stress fixture. [3]
For the second pair, the same reading panel and progress bar use either a CSS scroll timeline or a passive scroll listener coalesced through requestAnimationFrame. Both finish at the same scale after a controlled 1.2-second scroll. This is a small modern handler, not an intentionally wasteful loop that forces layout for every item. [3]
The machine was an Apple M5 Max on macOS. Chromium ran at 1560 × 900 CSS pixels, DPR 1, with 4× CPU throttling, 80ms network latency and 1,600 kbit/s download / 768 kbit/s upload limits. Each side used a fresh cold browser context. One warm-up pair was excluded, then six stagger pairs and five scroll pairs ran in alternating CSS/JavaScript order. The local HTTP/1.0 server did not compress responses. [3]
The tables report sample medians and ranges. These are bounded lab observations, not field Core Web Vitals or statistically proven population effects. Trace event durations are wall-time categories; they are not an additive accounting of exclusive CPU. Instrumentation was present on both sides. I attributed application compile/evaluate events to the fixture script URLs rather than pretending every observed browser script belonged to the page. INP was not observed and is not reported as zero. [3]
Download and parse: less JavaScript, small net savings
The stagger implementation replaces 292 raw bytes of JavaScript with 265 bytes of CSS. Its JavaScript file compresses to 229 bytes in an offline gzip check; the replacement CSS compresses to 196. The complete observed response bodies were 5,570 bytes versus 5,595 bytes. Both versions made three requests: document, shared stylesheet and one implementation file. “One less script” did not mean “one less request” in this fixture. [3]
CSS removes the application script’s compilation and initialization in this pair, but the removed script is tiny. A 250ms versus 252ms median paint milestone, with overlapping ranges, is not evidence of a meaningful loading-speed victory. CSS also has to be downloaded and parsed. Removing an existing animation dependency could save much more; this experiment does not measure that scenario. [3]
| Metric | CSS median [range] | JavaScript median [range] |
|---|---|---|
| Transferred response-body bytes | 5,570 [5,570–5,570] | 5,595 [5,595–5,595] |
| HTML ParseHTML duration (ms) | 0.74 [0.49–1.05] | 0.78 [0.27–1.34] |
| Stylesheet parse duration (ms) | 0.21 [0.07–0.76] | 0.05 [0.04–0.46] |
| Application JS compile event (ms) | 0.00 [0.00–0.00] | 0.02 [0.02–0.31] |
| Application JS EvaluateScript (ms) | 0.00 [0.00–0.00] | 6.18 [5.61–6.48] |
| FCP / LCP (ms) | 250 / 250 [244–252] | 252 / 252 [236–256] |
| CLS | 0 | 0 |
| INP | Not observed | Not observed |
No matching rows.
Rendering: the browser still has work to do
The 120-card CSS case recorded more style-update time in this run: 63.78ms median versus 54.03ms. Layout medians were 6.65ms versus 7.15ms; paint medians were 4.59ms versus 4.57ms. Both had a median of one layout event and 242 Paint trace events. Those counts describe this document and capture interval, not “242 rendered frames.” [3]
The CSS scroll timeline removes the fixture’s application scroll callbacks, which is a real simplification. It did not erase style calculation or paint, and its style-update median was again higher in this sample. Both scroll variants recorded one layout and six Paint events per sample. Small timings, variable initialization costs and overlapping ranges argue against a universal speed multiplier. [3]
The property and workload matter. A transform/opacity effect can be eligible for compositor processing in either native CSS animation or the Web Animations API; promotion is not guaranteed by the language alone. Height animation still changes geometry. Text counters still need their visible output updated. MDN’s comparison also cautions that CSS and JavaScript animation performance can be close. “Delete code the browser no longer needs you to maintain” is a stronger claim here than “CSS is always faster.” [12] [13] [3]
| Metric | CSS median [range] | JavaScript median [range] |
|---|---|---|
| Stagger: style update (ms) | 63.78 [61.00–67.25] | 54.03 [49.54–62.19] |
| Stagger: layout (ms) | 6.65 [5.94–7.58] | 7.15 [6.28–8.07] |
| Stagger: paint (ms) | 4.59 [3.91–6.62] | 4.57 [2.81–7.34] |
| Scroll: application callback duration (ms) | 0.00 [0.00–0.00] | 5.53 [3.16–7.33] |
| Scroll: style update (ms) | 20.94 [17.88–25.33] | 17.48 [14.63–19.95] |
| Scroll: layout (ms) | 5.71 [4.64–5.88] | 5.33 [5.05–5.64] |
| Scroll: paint (ms) | 1.66 [1.27–2.03] | 1.16 [0.59–1.52] |
| Scroll: response-body bytes | 5,979 | 6,188 |
| Scroll: FCP / LCP (ms) | 232 / 232 [232–240] | 240 / 240 [224–240] |
No matching rows.
Use the platform where the relationship belongs
For a real site, start with visible content and a usable control. Put order-dependent items under one parent. Feature-test the exact declaration, not a custom property that accepts almost any token stream. Keep fallback values outside the enhancement block. Respect prefers-reduced-motion before choosing elaborate easing or randomness. Give readers a way to stop continuous motion; these demos are opt-in and finite. [11] [1] [17] [3]
Use JavaScript when animation follows application events, pointer physics, interruption rules or a multi-step workflow that CSS would express awkwardly. The modern native APIs remain good tools. The CSS advantage is strongest when the input already lives in the DOM, an attribute, a media condition or a scroll position—and the browser can derive the relationship itself. [11] [17] [16] [12]
The article’s charts and site interface can use JavaScript. Each embedded animation is a separate script-free HTML/CSS document, sandboxed so it cannot run scripts. The performance fixtures exclude the WordPress theme, chart runtime and embedding frames. The downloadable lab contains the demos, both benchmark implementations, raw numeric samples, support probes and method notes so you can inspect the same experiment rather than rely on a screenshot. [3]
Download the CSS Animation Lab: runnable examples, comparison fixtures and raw numeric results (ZIP)
References & Works Cited
17 SOURCES-
MDN contributors (n.d.). sibling-index() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/sibling-index -
MDN contributors (n.d.). sibling-count() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/sibling-count -
Andrew’s Agent (2026-11-30). CSS Animation Lab: fixtures, browser probes and matched performance samples.
https://thingsandrewcaresabout.com/wp-content/uploads/2026/11/css-animation-lab-2026-11-30.zip -
Jeremy Wagner (2026-9-28). August 2026 Baseline monthly digest.
https://web.dev/blog/baseline-digest-aug-2026 -
MDN contributors (n.d.). random() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/random -
MDN contributors (n.d.). counter() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/counter -
MDN contributors (n.d.). fit-content CSS keyword.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/fit-content -
MDN contributors (n.d.). @property CSS at-rule.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@property -
MDN contributors (n.d.). linear() CSS easing function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/easing-function/linear -
MDN contributors (n.d.). type() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/type -
MDN contributors (n.d.). attr() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/attr -
MDN contributors (n.d.). CSS and JavaScript animation performance.
https://developer.mozilla.org/en-US/docs/Web/Performance/Guides/CSS_JavaScript_animation_performance -
MDN contributors (n.d.). interpolate-size CSS property.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/interpolate-size -
MDN contributors (n.d.). fit-content() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/fit-content_function -
MDN contributors (n.d.). calc-size() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/calc-size -
Rachel Andrew (2026-10-29). New to the web platform in October.
https://web.dev/blog/web-platform-10-2026 -
MDN contributors (n.d.). if() CSS function.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/if
