JSFiddle - React, Tailwind, and code Playground
by grendian
HTML
<div class='wrapper'>
<table>
<tr>
<td class='status'>St</td>
<td class='subject'>
<div class='inner-wrapper'>
<div class='inner'>
<div class='icon'></div>
<div class='icon'></div>
<div class='count'>(10)</div>
<div class='text'>This is the subject of the case in this row</div>
<div class='label'>Label</div>
<div class='label'>Label</div>
<div class='label'>Label</div>
<div class='label'>Label</div>
<div class='label'>Label</div>
</div>
</div>
</td>
<td class='author'>Some Guy</td>
</tr>
</table>
</div>
CSS
.wrapper {
width: 100%;
overflow: hidden;
border: 1px solid red;
}
.status {
width: 50px;
max-width: 50px;
min-width: 50px;
}
.author {
width: 120px;
min-width: 120px;
max-width: 120px;
}
.subject {
min-width: 200px;
max-width: 200px;
}
.inner-wrapper {
overflow: visible;
width: auto;
}
.inner {
display: flex;
flex-direction: row;
align-items: center;
overflow: hidden;
}
.inner > * {
-webkit-flex-shrink: 0;
}
.icon {
width: 14px;
height: 14px;
min-width: 14px;
background: green;
margin-right: 5px;
}
.text {
white-space: nowrap;
text-overflow: ellipsis;
}
.label {
margin: 5px;
padding: 2px 6px;
border-radius: 10px;
background: lightblue;
color: white;
}
table {
width: 100%;
overflow: hidden;
table-layout: auto;
}
td {
border: 1px solid black;
}