I know this is not a new question but I didn't find a strong debate yet and I would like to hear your opinions.
So, I want to do a simple component with a one direction layout. What should I use: Flexbox or CSS Grid? Why?
Is just a preference or there are pros and cons?
Check this super simple example: https://codepen.io/joaosaro/pen/rRJXOa A container with 3 children: two divs occupying only the content size and one that expands itself the maximum space possible.
.flex-container {
display: flex;
}
.flex-container .child--max {
flex: 1;
}
.grid-container {
display: grid;
grid-template-columns: auto 1fr auto;
}