# flex-shrink

> The `flex-shrink` CSS property defines how much a flex item will shrink relative to the rest of the flex items inside the flex container.

## How do I stop a flex item from shrinking?

The property that controls how much a flex item should shrink relative to the other flex items when there's not enough space in the flex container. It determines how an item reduces in size when the container is too small, helping to manage space distribution in tight layouts.

- Topic: Flexboxes
- Type: property
- Browser support: Chrome 29+, Chrome Android 29+, Edge 12+, Firefox 20+, Firefox Android 20+, Safari 9+, Safari iOS 9+

## Example

Wrong:

```css
.avatar {
  width: 40px;
}
```

Right:

```css
.avatar {
  width: 40px;
  flex-shrink: 0;
}
```

`flex-shrink: 0` keeps the avatar at 40px when the row runs out of space.

## Common mistakes

- An icon gets squished next to long text.
- `flex-shrink` does nothing because the item's `min-width: auto` keeps it at content size.

## Key points

- Fixed-size items like icons and avatars set `flex-shrink: 0`.
- Text items that should shrink also set `min-width: 0` so long content can be truncated.

## Interview questions

### What is the default flex-shrink value?

It is 1, so every flex item can shrink when the container is too small.

### Why won't my flex item shrink below its content?

Flex items have `min-width: auto` by default. Set `min-width: 0` or `overflow: hidden` to let them shrink further.

## Related cards

- [flex](https://wonderium.dev/css/flex.md)
- [flex-grow](https://wonderium.dev/css/flex-grow.md)
- [flex-basis](https://wonderium.dev/css/flex-basis.md)
- [min-width](https://wonderium.dev/css/min-width.md)
- [text-overflow](https://wonderium.dev/css/text-overflow.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/flex-shrink
- Last updated: 2026-11-25
