CSS 27 ๐ป flex-basis, flex and flex-flow properties
a - flex-basis property
flex-basis specifies the initial main size of a flexible item
This happens before any free space is distributed.
values โ witdth(em, px, %), auto(default), content, max-content, min-content and fit-content
flex-basis: 100px; โ initial main size
flex-basis: 1fr; โ proportionally sized with free space
flex-basis: 20%; โ proportionally sized by taking up 20% of available space
flex-basis: 5em; โ fixed size of 5em
b - flex property
flex property is a shorthand property for flex-grow, flex-shrink and flex-basis
It allows you to control how items are distributed inside theis container
values: (grow, shrink, basis) none โ 0 0 auto; auto โ 1 1 auto; 10em โ 1 1 10em
two values, if both integers: 2 2 โ 2 2 0%, if one integer: 1 30px โ 1 1 30px;
flex: 2 1 100px; โ grow twice, shrink once and initial size of 100px
flex: 1 2 auto; โ grow once, shrink twice and takes initial size based on content
flex: 1 1 5em; โ grow once, shrink once and set initial size to 5em
c - flex-flow property
flex-flow is a shorthand property for flex-direction and flex-wrap
It specifies items' direction and if wrapped
values(direction) โ row, row-reverse, column, column-reverse
values(wrap) โ nowrap, wrap, wrap-reverse
Values from direction and wrap can be used together or alone
flex-flow: row wrap; โ row direction with wrap enabled
flex-flow: column nowrap; โ column direction with wrap disabled
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!