Flexbox children shrink up to a certain point (but don't expand if they don't need to)
问题 I'm a having a bit of an issue here. I have a flexbox container with children of different sizes. Based on quantity and their content children might overflow the parent. What I want is the children to shrink so they try to fit in the parent container. I did that by adding shrink and overflow properties to the children. So far so good. .container > div { background-color: orange; padding: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; } I end up with