DEV Community

Discussion on: A beginners guide to CSS flexbox - part two

Collapse
 
dglsparsons profile image
Douglas Parsons

Hey. Great article and super clear breakdown. I really like how you do one property at a time.

With flex-grow you mention flex-grow of 2 making that particular element twice the size of the others - that's one to be careful of. It doesn't mean twice the size, but that the element will expand to fill empty space twice as quickly.

Collapse
 
dillonheadley profile image
Dillon Headley

If you add min-width: 0; on everything I think it sizes based on total space not just space available.

Collapse
 
dglsparsons profile image
Douglas Parsons • Edited

flex-basis: 0; would do the same. It's not always the behaviour you want though - sometimes you want items to only shrink to a certain size before they wrap.