Can I make a CSS grid with dynamic number of rows or columns?
Okay, after reading the MDN reference, I found the answer! The key to dynamic rows (or columns) is the repeat property. const COLORS = [ ‘#FE9’, ‘#9AF’, ‘#F9A’, “#AFA”, “#FA7” ]; function addItem(container, template) { let color = COLORS[_.random(COLORS.length – 1)]; let num = _.random(10000); container.append(Mustache.render(template, { color, num })); } $(() => { const … Read more