Open Illustrissimus-1 opened 3 years ago
@Illustrissimus-1
You don't need to repeat 43px. Otherwise, as long as you have defined itemsCount, this should work.
.container { display:grid; grid-gap:10px; grid-template-columns:repeat(var(--itemsCount),43px); grid-auto-rows:75px; }
Can CSS variables be used with CSS Grid? In the example below replacing var(--itemsCount) with an integer works OK.
.container { display:grid; grid-gap:10px; grid-template-columns:repeat(var(--itemsCount),43px 43px 43px 43px); grid-auto-rows:75px; }