I'm using auto-fill
for the columns of my grid. But some times the width of the cells is greater than their height.
Is there a way to keep them squared? While the width increases the height also increases.
ul {
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
grid-auto-rows: minmax(100px, auto);
grid-auto-flow: row dense;
gap: 10px;
padding: 10px;
}
ul li {
background: salmon;
}
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<ul>
To illustrate my problem: