Is it OK to omit CSS Grid areas you have defined?

Viewed 44

Do you think it's acceptable to omit grid areas you've defined from your markup? I have defined the following grid-template-areas but deliberately omitted them:

grid-template-areas: "nav  one two three"
"nav  four five six";

I assigned one grid area, the nav so that I could get two columns, but the rest of the grid areas are populated in PHP using a foreach loop, and it seems to work fine in Chrome and Firefox.

Here's a CodePen to demonstrate:

https://codepen.io/endymion1818/pen/LOOJoy

Since this works for the layout I want to achieve, and allows the client to add more blocks if they want to without breaking the layout, should I use it in production?

0 Answers
Related