With my limited knowledge of css, I think the grid layout (by setting grid-auto-columns
and grid-auto-rows
to 1fr
) can be used as a hacky way to implement the infinite field. But since I am using a bunch of <span>
elements to represent the cells, it would be super slow anyway. The demo implemented by copy looks amazing and I hope to have time to look deeper into that later.
Lots of other cool features can be added (say generate a new game by different patterns), but I currently don't have time for that. Still I hope you enjoy this minimal demo!