How to take control of Flexbox
-
Flex children are just that:
display: block
ordisplay: inline
don't have any affect oncedisplay: flex
is defined on the parent. -
Flexbox is controlled inside --> out: The size of the children affect the size of the parent. Grid is outside --> in: the size of the parent is specified and the children fit inside.
-
Defaults: flexbox by default uses the 'best' size for the children. It doesn't expand them, but it will shrink them if necessary.
flex-shrink: 1;
flex-grow: 0; -
If you have multiple rows and columns, and you want them consistent, grid is the better choice
-
width is the same as flex-basis IF you are using columns
April 1, 2024 at 2:37:36 PM EDT
*
FILLER