Breaking a row into a column without media queries
Heydon Pickering's Holy Albatross makes a row of elements turn into a stacked column once the parent reaches a given width. That trigger comes from the container rather than the viewport, so it behaves like the container query everyone wanted before container queries existed. In practice the technique pays off with three or more children; two is rarely worth the machinery.
Where the original approach stalls: sizing the unstacked row
The first article left the widths of the horizontal children untouched, so an element that needed to be wider than its siblings had no clean answer. The follow-up supplies one via flex-grow, demo included, but Xiao Zhuo Jia argues the system falls apart at that point: the hack occupies the width property, leaving nothing to size the non-stacked column with. Under flex-grow a column that should be 50% of a three-column row means writing flex-grow: 2.333, and every other child's value must be adjusted in step with the known column count — unintuitive, and brittle as soon as the layout changes.
Swapping to min-width and max-width (as in Heydon's min-width/max-width codepen) doesn't rescue it. Jia notes that max-width: 100% is unnecessary, since flex-shrink already caps anything larger at 100%, so only min-width is doing work. The catch is that min-width has to be declared on every child; any child without one gets grown by flex-grow past the intended size. None of it is pleasant.
The Unholy Albatross
Jia's fix, the Unholy Albatross, keeps the Albatross spirit while giving width back to the author. It builds on the max() function combined with CSS custom properties that carry fallbacks, and it accepts a width — pixel value or ratio — on any element through --width. Gaps are supported as well.
The mechanics are written up under the How does it work? section of Jia's article, linked directly below.




