Flex Shrink
Control how flex items shrink to fit within the available space.
The flexShrink property defines the ability for a flex item to shrink if necessary. It specifies the flex shrink factor, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed.
Example
Loading Preview…
Quick Notes
- The default is
1. Shrinkage is weighted by each item's shrink factor and initial main size, and respects minimum sizes; it may not eliminate all overflow. - Set to
0to prevent an item from shrinking.