CSS · Layout

flex-shrink

Whether a flex item may shrink when space is tight. Prevent shrinking on icons and buttons.

Syntax
flex-shrink: 0

Example

Try it

More in this group

align-content align-items align-self clear display flex flex-basis flex-direction

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course