HTML & CSS · Middle · Question 55 of 75

Why add flex-shrink: 0 to an icon inside a flex row with long text?

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.

Further reading

Problem with a question

HTML & CSS · Middle · question 55

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz