> For the complete documentation index, see [llms.txt](https://irena-popova.gitbook.io/flexbox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://irena-popova.gitbook.io/flexbox/flex.md).

# flex

### flex

Sometimes, **setting flex-grow, flex-shrink and flex-basis** separately are tiring.&#x20;

&#x20;You can set all 3 with the **flex** shorthand. The added bonus of this way is you don't have to set all 3 value, you can skip the properties you're not interested in and just set the one you are. And for the ones you skipped, it will just take on the default value.&#x20;

```css
.child {
  flex: 0 1 auto /* default */
     or <flex-grow> <flex-shrink> <flex-basis>
     or <flex-grow>
     or <flex-basis>
     or <flex-grow> <flex-basis>
     or <flex-grow> <flex-shrink>
}
 
```

![](https://1188262252-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MShOB5olIFJqbXrreDC%2F-MT0gMZHJoS4yd_zfcwV%2F-MT0hGGIR5V9PFssfngt%2Fflex.jpeg?alt=media\&token=8ba12ec8-7f34-4c5d-9ad0-cb50bd861297)
