Stable zigzag CSS layouts with CSS Grid and transforms
Staggered zigzag layouts usually turn into brittle flexbox hacks that wreck DOM order. Here is how CSS Grid plus a translateY transform gives you a stable waterfall effect, including the gap math and the overflow fix.