main axis
The direction flex items are laid out in, horizontal for flex-direction: row and vertical for column.
In more detail
It follows flex-direction and the writing direction of the page. justify-content distributes space along the main axis, and flex-grow and flex-shrink resize items along it.
Related terms
- cross axis — The direction at right angles to a flex container's main axis, vertical for a row and horizontal for a column.
- flex-direction — The flexbox property that sets the main axis: row (the default) lays items out horizontally, column vertically.
- justify-content — The flexbox and grid property that distributes free space along the main axis, for example packing items at the start or spreading them evenly.
Taught in
- Deep Flexbox: Flex Grow, Shrink, Basis And Alignment Physics — Frontend Architecture & Web Platform