As awesome as flexbox is, what it’s doing under the hood is actually a little strange because, by default, it is doing two things at once. It first looks at the content size which is what we would get if by declaring width: max-content on an element. But on top of that, flex-shrink is also doing some work allowing the items to be smaller, but only if needed.
Let’s break those two down and see how they work together.
Our comprehensive guide to CSS grid, focusing on all the settings both for the grid parent container and the grid child elements.