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.
When you apply a CSS property to an element, there’s lots of things going on under the hood. For example, let’s say we have some HTML like this:
<div class="parent"<div class="child"Child</div<div class="child"Child</div<div class="child"Child</div</div
Robin Rendle on (Updated on )
The short answer:
flex-basis are probably what you’re lookin’ for.…
Robin Rendle on