JSFiddle - React, Tailwind, and code Playground
by Katarn
HTML
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
</ul>
CSS
ul {
position: absolute;
top: 0;
bottom: 0;
left: 0;
background: purple;
padding: 10px;
margin: 0;
display: grid;
gap: 10px;
grid-template-columns: fit-content(100vw);
}
li {
display: block;
list-style: none;
background: white;
aspect-ratio: 1;
height: 100%;
width: auto;
}