Hi folks, looking for a little advice on the etch a sketch project. Most of the solutions I peaked at used css grids, but I’ve been taking a crack at it using flexbox. I haven’t implemented the actual hover listeners quite yet, but I’ve been having some issues with squares overflowing to the next line above a certain threshold (for me it gets dicey after 33.)
After looking through some similar threads I decided to truncate the size formula which helped with lower numbers like 7, 11, 16, etc, but it would be nice to be able to use more squares without things getting weird. Any advice?
UPDATE 8/30 Turns out I messed some calculations up with borders. I decided to go back and add a border image and it broke everything. After some poking around setting my generated divs to box-sizing: border-box; fixed everything. For the time being I’m going to stick with static sizing, as I can’t seem to properly manipulate the div size based on the parent element’s size if said parent is set as a percentage.