I have a CSS grid
.wrapper {
display: grid;
grid-template-columns: repeat(auto-fill, 12.5vw );
grid-template-rows: repeat(auto-fill, 12.5vw );
background-color: black;
grid-auto-flow: row dense;
color: #444;
}
<div class="wrapper">
<div class="box wide tall a">
</div>
<div class="box b">
</div>
<div class="box c">
</div>
<div class="box c">
</div>
<div class="box d">
</div>
<div class="box e">
</div>
<div class="box f">
</div>
<div class="box g">
</div>
<div class="box h">
</div>
</div>
And I would like to know the number of columns in my javascript code. is it possible?
EDIT: the reason i want this is that if there is less than the good amount of items so that it makes a square, I want these extra items not to be displayed at all.
Thanks a lot!