As we all know, the flex
property is a shorthand for the flex-grow
, flex-shrink
, and the flex-basis
properties. Its default value is 0 1 auto
, which means
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
but I've noticed, in many places flex: 1
is used. Is it shorthand for 1 1 auto
or 1 0 auto
? I can't understand what it means and I get nothing when I google.
flex: 1
means the following:
flex-grow : 1; ➜ The div will grow in same proportion as the window-size
flex-shrink : 1; ➜ The div will shrink in same proportion as the window-size
flex-basis : 0; ➜ The div does not have a starting value as such and will
take up screen as per the screen size available for
e.g:- if 3 divs are in the wrapper then each div will take 33%.