JSFiddle - React, Tailwind, and code Playground

by tonyleeper

HTML

<br />
<br />

<ul class="tab-strip">
    <li class="fixed">Start</li>
    <li>
        <div>
            <span>this text is very very long and it goes on and on and on and on but does not wrap</span>
        </div>
    </li>
    <li>two</li>
    <li>three</li>
    <li>four</li>
</ul>

CSS

ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: table;
    border-spacing: 6px 0px;
}

li {
    display: table-cell;
    background-color: red;
    width: 150px;
}

li > div {
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px;
}

p {
    text-overflow: ellipsis;
}

li.fixed {
    width: 100px;
    min-width: 100px;
}

JavaScript

/**
    tabstrip layout
*/