Flexbox

Flex Basis

Utilities to specify the initial size of the flex element before any free space is distributed based on flex factors.


Variant

Active Checked Child-Selection Dark Mode Disabled Expand First-Last-Selection First-Letter Focus Focus-Visible Focus-Within Fullscreen Group-Focus Group-Hover Hover Landscape Light Mode Portrait Reduce-Motion Responsive Selection-Hover Visited

API

classcss
flex-basis-fillflex-basis: fill
flex-basis-contentflex-basis: content
flex-basis-max-contentflex-basis: max-content
flex-basis-min-contentflex-basis: min-content
flex-basis-fit-contentflex-basis: fit-content
classcss
flex-basis-1flex-basis: 0.25em
flex-basis-2flex-basis: 0.5em
flex-basis-3flex-basis: 0.75em
flex-basis-4flex-basis: 1em
flex-basis-5flex-basis: 1.25em
flex-basis-6flex-basis: 1.5em
flex-basis-8flex-basis: 2em
flex-basis-10flex-basis: 2.5em
flex-basis-12flex-basis: 3em
flex-basis-16flex-basis: 4em
flex-basis-20flex-basis: 5em
flex-basis-24flex-basis: 6em
flex-basis-32flex-basis: 8em
flex-basis-40flex-basis: 10em
flex-basis-48flex-basis: 12em
flex-basis-56flex-basis: 14em
flex-basis-64flex-basis: 16em
flex-basis-72flex-basis: 18em
flex-basis-80flex-basis: 20em
flex-basis-88flex-basis: 22em
flex-basis-96flex-basis: 24em
flex-basis-104flex-basis: 26em
flex-basis-112flex-basis: 28em

Usage

flex-basis: auto
flex-basis: fit-content
flex-basis: max-content
flex-basis: min-content
flex-basis: content
<div class="flex flex-basis-auto">
...
</div>
HTML
.dummy {
@extend
.flex,
.flex-basis-auto;
}
SCSS
flex-basis: 4em
flex-basis: 32em
flex-basis: 64em
<div class="flex flex-basis-32">
...
</div>
HTML
.dummy {
@extend
.flex,
.flex-basis-32;
}
SCSS