I'm experimenting with flexbox and I ran into this issue.
It looks like a flexbox item where its text wraps to a new line, occupies more width than it should.
See example: https://jsfiddle.net/go20sq1u/1/
<div class="flex-container">
<div>Some Text Online</div>
<div>This longtext wrapsline</div>
<div>Short 1</div>
<div>Short 2</div>
<div>Normal</div>
</div>
Why are elements "This longtext wrapsline" and "Some Text Online" seemingly occupying more width than they need? Therefore taking away space that "Short 1" and "Short 2" could probably use instead.
Shouldn't the container of "This longtext wrapsline" and "Some Text Online" shrink to the width of the longest word? Instead, it is much larger than the longest word as you can see.
Why is the extra space there? And what does the amount of space depend from? As in, how is that extra space calculated, what is it based on?
Is there any explanation for this? Or any workaround?
Thanks for the insight!