12
Heard a junior dev at a meetup in Austin say 'Grid is just for big layouts' and I had to step in
3 comments
Log in to join the discussion
Log In3 Comments
ben_shah9329d ago
Oh man, where do people get these ideas? I heard something similar last week about flexbox being the only tool you need. Grid is amazing for small stuff too, like a simple form or a header layout. It gives you control that flexbox just doesn't have in two dimensions. I always use it for lining things up cleanly, no matter the size.
4
evana7129d ago
Wasn't there a big article a while back about how we all learned flexbox first so we just default to it? I read something like that and it made a lot of sense. Grid feels like the right tool for any layout where you need things to line up in both directions, even for tiny components. I've started using it for simple card layouts and it's way cleaner than hacking flexbox to do the same thing.
5
alice_barnes3521d ago
Totally used to avoid grid for small things until I tried it on a simple login form last month. @ben_shah93 is right about the control, having those columns and rows defined just makes everything snap into place without extra wrapper divs. It felt weird at first but now I reach for it almost automatically.
5