DEV Community

loading...

CSS Grid or Flexbox in 2019

nzee profile image Nazim Zeeshan ・1 min read

Discussion (12)

pic
Editor guide
Collapse
sally profile image
Sally

Both. They do different things.

Read some of Rachel Andrew's work, and blog posts on CSS Tricks. They will explain it in detail.

Collapse
nzee profile image
Nazim Zeeshan Author

Thanks Sally! Will read articles that you have suggested.

Collapse
deciduously profile image
Ben Lovy

Both! Just Flexbox for simple pages, and Flexbox inside Grid for more complex layouts

Collapse
nzee profile image
Collapse
nzee profile image
Nazim Zeeshan Author

Which is your go-to choice for building layouts for your apps. Grid or Flexbox?

Collapse
nabbisen profile image
Heddi Nabbisen

I'm moving from Flexbox to Grid, because I knew Grid is now partially supported in Internet Explorer 11...πŸ™‚
It requires -ms- vendor prefix:

Collapse
nzee profile image
Collapse
christianotto profile image
Christian Otto

I prefer to use Flexbox on parts of the UI that basically stay the same in any scenario or have limited changes in different responsive behaviours, like for example interaction or input controls. There I usually see no need for using CSS Grid, which is what i tend to use more when it comes to the global (app) layout, that is, the app container, dashboards and the likes.

Collapse
natonathan profile image
Nathan Tamez

I use both. It all depends on the use case.

Collapse
nzee profile image
Collapse
joel profile image
Joel Krause

Flex box for me. IE 11 support for Grid isn’t to crash hot so unfortunately we can’t use it on production sites.

Collapse
nzee profile image
Nazim Zeeshan Author

I see, thanks, Joel!