I use active flex , I solve all problems with it during layout.

But many people say that the grid is our future.

Is it really good, and what is better to use?

  • 3
    It all depends on the task, grids allow you to work both horizontally and vertically. Grids are more convenient to use for the layout of the main blocks, and for the rest flex . - E_K
  • For me, the grid is the same html-grid, only on CSS. That is, you imagine a table and combine several columns into one, several lines into one, in a flex it is more difficult to deal with. - Qsandrew
  • Those. large blocks on the site should be placed on the grid, and inside them on the flex? - bla bla213213213
  • 2
    This is not mandatory, you need to do it as it is more convenient for you and the task requires it. Sites can be fully made on flex or grid , but there are situations when it is easier to use a specific tool. The link is an example that I did on bootstrap (i.e., flex ), and on grids it could be done in a couple of lines of code and with less html . - E_K
  • one
    All right they say, it depends on the task, but I want to add that the support of grids is now 88% while flex 95, therefore, without special need for grids, it is perfectly possible to do with flexs. I think somewhere in a year it will be possible to combine them without looking at the old browsers, as was the case with flexes - l2banners 2:38 pm

1 answer 1

Depending on the task. For example, if you need to design React-components for positioning child elements, you should use a Grid: Both Chrome and Safari use the webkit display engine and it is not friendly with flex ...

chrome-flex-bug

In this question, you can see the code correctly displayed in FireFox and not working in Chrome. The question was asked in 2015 and is still not closed!

However, if nested flex containers are not foreseen, they can also be used ...