|
|
|
|
|
by code_biologist
1299 days ago
|
|
For anyone unsure whether to use flex or grid, the mental shorthand that I use is whether the container or the elements in a container should have more control over the layout. Flex is better if the individual elements should have some control over the layout, whereas grid is better if the container should be fully controlling the layout. Great 20min tutorial vid with examples and details on the above: https://www.youtube.com/watch?v=3elGSZSWTbM |
|
Another data point I use is that if I find myself adding a container for the sole purpose of layout, I realize that I should be using grid. That is one of the biggest wins of grid: you don't need to pollute your markup with nearly as many layout/presentation-only elements.