We all know,
The flex property is a shorthand for the flex-grow, flex-shrink, and the flex-basis properties.
And its default value is 0 1 auto. It means-
Here is the explanation:
Equivalent to flex: <positive-number> 1 0. Makes the flex item flexible and sets the flex basis to zero, resulting in an item that receives the specified proportion of the free space in the flex container. If all items in the flex container use this pattern, their sizes will be proportional to the specified flex factor.
flex:1 it is equivalent to
flex: 1 1 0