- first to arrive
- then this one
- then this one
- and last of all
A stagger that survives a new item
Caveatsibling-index() returns a plain number, so it has to be given a unit by hand: calc(sibling-index() * 140ms), never the bare function. It counts element siblings from one, including elements set to display: none, so a hidden row still spends its place in the sequence and leaves a gap you did not ask for.
FallbackAn unsupported function makes the whole declaration invalid, so every item falls back to the delay it would otherwise have, usually zero, and the list arrives in one go rather than in sequence. Declare a sensible animation-delay first and let the calc() override it where it parses.
<ul><li></li><li></li></ul>
li {
animation: slide-in .5s both;
/* one rule, any number of items */
animation-delay:
calc(sibling-index() * 140ms);
}