JSFiddle - React, Tailwind, and code Playground
HTML
<div class="main">
<div class="side"></div>
<div class="content">
<div class="container">
<div class="text">This is a text that is supposed to get truncated properly when needed.</div>
<div class="box">Hello</div>
</div>
</div>
</div>
CSS
.container .box {
background-color: #efefef;
padding: 5px;
border: 1px solid #666666;
flex: 0 0 auto;
}
.container .text {
flex: 1 1 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.container {
display: flex;
}
.main {
display: flex;
}
.main .side {
width: 100px;
background-color: #ff9900;
flex: 0 0 auto;
}
.main .content {
flex: 1 1 auto;
/* min-width: 0; */
overflow: hidden; /* NEW */
}