CSS flex-shrink Property
Description
The flex-shrink property determines how a flex item reduces its size when the flex container has less space than the sum of its items’ base sizes. It applies along the container’s main axis and only becomes relevant when available space is negative (i.e., the items would otherwise overflow). In that situation, the property acts as a relative guide that tells the layout system how much each item should give up of its base space compared with its siblings.
Rather than forcing an absolute size change, flex-shrink works as a proportional factor: items with a larger factor yield more of their base size than items with a smaller factor. That behavior must be read together with each item’s initial size — commonly established by flex-basis or the item’s intrinsic content size — because the amount available to shrink is calculated from those starting sizes. It also interacts with the item’s ability to grow; for coordinated sizing when space is abundant, the related flex-grow factor controls expansion, while flex-shrink controls contraction.
Practical layout results can also be influenced by shorthand usage and constraints. The flex shorthand can set shrink behavior together with growth and base size, so using the shorthand may override a separately declared shrink behavior. Additionally, minimum size constraints such as min-width and min-height can prevent an item from shrinking beyond a certain point, causing remaining negative space to be resolved by other items or by overflow. Understanding flex-shrink in the context of base sizes and such constraints is key to predicting how a flex layout will adapt when the container becomes smaller.
Definition
- Initial value
- 1
- Applies to
- Flex items, including in-flow pseudo-elements
- Inherited
- No
- Computed value
- As specified
- Animatable
- Yes
- JavaScript syntax
- object.style.flexShrink
Interactive Demo
Syntax
flex-shrink: <number>
Values
- <number>Integers (1, 2, 3, ...) or fractional numbers (for example: 0.6) are accepted. Negative values are ignored.
Example
Browser Support
The following information will show you the current browser support for the CSS flex-shrink property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
