|
|
|
|
|
by brigadier132
1062 days ago
|
|
I'll be a little more helpful since I wrote a one liner without really explaining anything... One explanation people like to give is: CSS Grid is for layouts in 2 dimensions, Flexbox is for layouts along one dimension. Which can be confusing because you absolutely can use Grid for layouts along one dimension too. Here is my stupid sounding rule of thumb that I think is more useful: If you want a grid layout use grid, if you want a flexible layout use flexbox. Grid quite literally splits the area into a grid but what if you want to just say "I want these two elements to be as far apart as possible within the container they are in" (ie a navbar, you want the logo on the left about 20 pixels away from the left of the viewpoert and you want the actual navigation to be on the right with the rightmost element 20px away from the right of the viewport). Flexbox is better for that. |
|
(I'm considering proposing one myself).