DEV Community

Discussion on: Flex items are not grid columns

Collapse
 
rusnick31 profile image
rusnick31

Great article!

If I'm not missing something you can achieve the same thing with flexbox by changing flex-grow: 1 to flex: 1
codepen.io/kenbellows/pen/drwagy

ul > li {
  list-style: none;
  flex: 1;

  text-align: center;
}
Enter fullscreen mode Exit fullscreen mode

flex: 1 would implicitly set flex-basis to 0 (instead of default auto) so the available space would be distributed evenly between flex items (like in the grid example below)