In the following snippet, the text in the first box will wrap. However, the width of the box is wider than necessary. How can the width be limited to the actual width of the wrapped text?
.outer {
width: 120px;
}
.inner {
display: flex;
}
.item {
flex: 0 1 auto;
font-size: 20px;
border:1px solid #000;
background-color: #3ff;
}
<div class="outer">
<div class="inner">
<div class="item">The quick brown fox</div>
</div>
<div class="inner">
<div class="item">Hello world</div>
</div>
</div>