JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li><span>A</span></li>
    <li><span>this is a pretty long text that will overflow the parent container adjas ldjasl djaslk dasd asd asd asdasd asdasd</span></li>
    <li><span>C</span></li>
</ul>

CSS

ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #ddd;
    justify-content: space-between;
}

li {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: white;
    align-self: center;
    min-width: 50px;
    margin: 10px;
    box-sizing: border-box;
    border-radius: 1em;
}

li:first-child {
    align-self: flex-start;
}
li:last-child {
    align-self: flex-end;
}

span {
    background-color: blue;
    padding: 0em 1em;
    border-radius: 1em;
}