flex-grow, flex-shrink & flex-basis
These three properties control how flex items size themselves within the container.
flex-grow
How much an item should grow relative to siblings when there is extra space. Default: 0.
flex-shrink
How much an item should shrink when there is not enough space. Default: 1.
flex-basis
The initial size of an item before growing/shrinking. Can be px, %, or auto.
Shorthand: flex
flex: grow shrink basis — Common patterns:
flex: 1→ equal width, fills spaceflex: 0 0 200px→ fixed 200px, won't grow or shrinkflex: 1 1 auto→ grows and shrinks based on content