While creating a grid in nextjs and CSS, I encountered an issue. Whenever I use the following code:
display: grid;
The items overflow beyond the container, even though I have set a maximum width. Instead of flowing over to the next row, the items just keep extending to the right until they go off-screen completely. You can view my code on the nextjs playground here.