JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li style="flex: 1 1;">A</li>
<li style="flex: 2 2;">this is a pretty long text that will overflow the parent container</li>
<li style="flex: 1 1;">C</li>
</ul>
CSS
ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
li {
padding: 0em 1em;
background-color: blue;
border-radius: 2em;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: white;
}