Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
flex-grow
The default for any item is 0.
If all items are defined as 1 and one is defined as 2, the bigger element will take the space of two “1” items.
flex-shrink
The default for any item is 1.
If all items are defined as 1 and one is defined as 3, that element will shrink 3 times as much as the others when less space is available.
flex-basis
If set to auto, it sizes an item according to its width or height, and adds extra space based on the flex-grow property.
If set to 0, it does not add any extra space for the item when calculating the layout.
If you specify a pixel number value, it will use that as the length value (width or height, depending on whether it’s a row or a column layout).
flex
This property combines the above 3 properties:
flex-growflex-shrinkflex-basis
and provides the shorthand syntax: flex: 0 1 auto