DEV Community

Discussion on: The designer who doesn't code

Collapse
 
vikasyadav72 profile image
Vikas Yadav

Should i build my layout with only CSS grid or combine it with flexbox and use a combination of the two. I have read a lot about that, but what benefit is there for using Grid and flexbox in tandem?

Collapse
 
metamn profile image
metamn

There is no golden rule which technique to use.

Personally I use Flexbox everywhere possible - because I know Flexbox better than Grid and I have lots of reusable Flexbox components. (Flexbox came out first, years ahead of Grid).

There are cases when Grid must be used and Flexbox can't help. This makes Grid more powerful than Flexbox.

If you are new to both techniques I recommend start with Grid.

Collapse
 
vikasyadav72 profile image
Vikas Yadav

Sometimes I too feel the same way. Grid is a little overkill for basic layouts, flexible does the job perfectly 99%. But since grid is all the rage these days, I guess no other choice but to get used to it