HTML & CSS · Middle · Question 55 of 75
Why add flex-shrink: 0 to an icon inside a flex row with long text?
- ✓Correct answer: So the icon keeps its width instead of being squeezed when space runs out
- 2So the icon doesn't wrap to the next line
- 3So the icon becomes square
Explanation
Flex items shrink by default (flex-shrink: 1). Fixed-size elements like icons and avatars should opt out, while the text gets min-width: 0 to truncate.