Flex direction
The flex-direction utility lets you control the direction in which flex items are placed inside a flex container.
It supports both static and responsive variants generated through mixins and loops.
Naming convention
Section titled “Naming convention”All classes follow the structure:
.u--flex-direction-{value}.u--flex-direction-{breakpoint}-{value}When to use
Section titled “When to use”Use this utility when:
- You’re using
display: flexand need to control the direction of child elements - You want to toggle between
row,column, orreversedirections - You need responsive direction changes without writing custom styles
Responsive variants
Section titled “Responsive variants”This utility supports responsive variants, using breakpoint prefixes like:
desktop, laptop, tabletl, tabletm, tablets, mobile.
How to use
Section titled “How to use”In HTML
<div class="u--display-flex u--flex-direction-column u--flex-direction-tabletl-row"> <div>Item A</div> <div>Item B</div></div>In CSS
.c--card-a { @extend .u--display-flex; @extend .u--flex-direction-column; @extend .u--flex-direction-tabletl-row;}Knowledge Check
Test your understanding of this section
Loading questions...