I have a css column grid. (the icons div is a child of a div with a dynamic/auto height)
The grid items must be squares. There are a lot of examples how you can achieve this in a row / horizontal approach For the column / vertical it doesn't work (I can't get it to work)
.icons {
height: 100%;
display: grid;
grid-template-rows: 1fr 1fr;
grid-gap: 25px;
}
.icon-wrapper {
background-color: tomato;
height: 100%;
// width: 0;
// padding-right: 100%;
}
<div class="icons">
<div class="icon-wrapper">
<div class="icon">icon 1</div>
</div>
<div class="icon-wrapper">
<div class="icon">123</div>
</div>
</div>
Can someone please help me.