T
22

Appreciation post: finally using grid-template-areas in my dashboard layout

I used to build data dashboards with flexbox nested inside float layouts, which meant constant margin tweaks every time a client wanted a new widget. Last month I moved a whole inventory panel to grid-template-areas and it snapped into place with zero media query headaches. Has anyone else found that named grid areas make rearranging content way less painful than old-school methods?
2 comments

Log in to join the discussion

Log In
2 Comments
noraj79
noraj797d ago
Hasn't named grid areas just saved you from chasing down weird margin bugs for good?
1
garcia.miles
oh man, named grid areas are a lifesaver for real. i used to spend forever tweaking negative margins just to get things to line up, and then something else would break and i'd be back to square one. now i just label my header, sidebar, and main content and it just... works. feels like cheating sometimes but i'll take it over chasing those phantom spacing bugs any day.
4