Flexible sizing
Start with a basis, then distribute positive or negative free space.
flex-basis
10rem basis18rem basis
The basis is the starting main size before growing or shrinking.
Positive space: flex-grow
grow 1grow 2
The second item receives twice the share of available positive space.
Negative space: flex-shrink
shrink 0shrink 1shrink 2
Shrink factors help remove negative space, though content can set a practical limit.
The flex shorthand
flex: 1 1 12remflex: 2 1 12rem
Read each value as grow, shrink, then basis.