My goal is to create nxn tic tac toe game in React. Now I have the board class wrapping squares.
This is the css:
.board {
display: grid;
width: 25rem;
height: 25rem;
**grid-template: repeat(3, 1fr) / repeat(3, 1fr);**
}
.square {
border: 1px solid black;
display: grid;
place-items: center;
font-size: 40px;
}
In the .board css how can I make this dynamic and not 3 - for example if the grid is 4X4 then I will have to do repeat(4,1fr) etc...how it will be generic for all sizes?
n x nbox it has to make ? depending onwidthandheight?