Z
Z
ZaxapKramer2017-02-17 09:15:39
css
ZaxapKramer, 2017-02-17 09:15:39

Is it reasonable to use display:flex, display:grid? What is the real difference between gird and flex?

From time to time I ask myself: does using flex or grid have any real advantages when developing simple one-screen sites?
I looked at many ready-made grids: both old (without these innovations ), and flex- and grid-grids. Flex grids look more bulky (or haven't seen really good ones)...
What is the real difference between Flex and Grid, the advantages of using one and the disadvantages of using the other?
Can you give examples of grids or css microframeworks on flex or grid that you yourself used/are using?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2017-02-17
@ZaxapKramer

If you don't see the difference, then you don't know what flexbox and grids are. Excuse me. The difference in the layout of the markup, well, just colossal.
With grids, the basic markup of an entire page can be built with just a few lines of css. Flexbox won't give you that. As I see it, flexbox is designed to solve the problems of building markup through floats + adding chips on top.
grids are designed to solve the problem of both + add chips on top. But grids are not a replacement for flexbox. They can and should be used together.
An example is this: there is a well-known Masonry grid, right now, you can’t do it manually using flexbox, but with the help of grids, it’s time to spit. Can you hear the difference?
As a result, flexbox can already be used. I have been using it for half a year already, I wrote myself a grid, which is just wonderful and convenient. I would not use grids for about a year and a half. But you can study now.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question