JSFiddle - React, Tailwind, and code Playground
by Kolichikov
HTML
<div class='container'>
<div class='title'>Title that is super long </div>
<div class='location'>location is also an insanely long piece of text</div>
<div class='notes'>notes</div>
<div class='links'>links</div>
<div class='date'>date</div>
</div>
<div class='container'>
<div class='title'>
<p style="vertical-align:middle">Title that is super long</p>
</div>
<div class='location'>location</div>
<div class='date'>date</div>
</div>
<div class='container'>
<div class='title'>Title that is super long and we are going to have a problem fitting it</div>
<div class='location'>location</div>
<div class='date'>date</div>
</div>
<div class='container'>
<div class='title'>Title that is super long and we are going to have a problem fitting it</div>
<div class='date'>date</div>
</div>
CSS
.container > * {
border: 1px solid black;
}
.container {
display: grid;
grid-template-columns: 70px 1fr;
grid-template-rows: 1fr;
grid-auto-rows: 25%;
height: 70px;
width: 220px;
margin-top: 5px;
}
.title, .location {
overflow: hidden;
}
.title, .location, .notes, .links {
grid-column: 2;
}
.date {
grid-column: 1;
grid-row-start: 1;
}
.date:nth-child(5) {
grid-row-end: 5;
background-color: lightblue;
}
.date:nth-child(4) {
grid-row-end: 4;
background-color: lightgreen;
}
.date:nth-child(3) {
grid-row-end: 3;
background-color: lightyellow;
}
.date:nth-child(2) {
grid-row-end: 2;
background-color: coral;
}