flex-shrink
The flexbox property that says how much an item gives up when items are too big for the container, weighted by each item's base size.
In more detail
Each item's share of the overflow is its shrink factor times its flex-basis, divided by the sum of those products. Setting flex-shrink: 0 stops important items, such as a sidebar or logo, from being squashed.
Related terms
- flex-grow — The flexbox property that says how much of the leftover space an item takes, relative to the other items' grow values.
- flex-basis — The flexbox property that sets an item's starting size along the main axis, before any spare space is shared out or taken away.
- negative free space — The amount by which flex items' base sizes exceed the container, which flex-shrink then takes back from the items.
Taught in
- Deep Flexbox: Flex Grow, Shrink, Basis And Alignment Physics — Frontend Architecture & Web Platform