Combining the flexbox sizing properties using the flex shorthand

Share this video with your friends

Send Tweet

The flex shorthand makes it easier to declare flex-shrink, flex-grow, and flex-basis, but it sometimes has unexpected results because the defaults differ.

Raunaq Sahni
~ 5 years ago

Hello Garth,

When using the flex shorthand notation, both flex-grow and flex-shrink default to 1 and flex-basis defaults to 0. However, when using the flex-basis notation, flex-grow defaults to 0 and flex-shrink defaults to 1. Did I get that right?

Thanks!