Flexbox
Flexbox utilities for some fast and easy-to-use flexboxin!' Note that these utilities do not encompass every flexbox rule, but only the most commonly-used ones.
Responsive modifiers such as __m
or __l
can be added to nearly all the classes below to make them functional only for screen sizes at our responsive breakpoints.
Display Flex
Set the flex container.
.flex, .l-flex Display Flex
Set horizonal positioning of items within the flex container.
.flex-row Flex Row
Row Item 1
Row Item 2
Row Item 3
.flex-row-reverse Flex Row Reverse
Row Item 1
Row Item 2
Row Item 3
.flex-column Flex Column
Column Item 1
Column Item 2
Column Item 3
.flex-column-reverse Flex Column Reverse
Column Item 1
Column Item 2
Column Item 3
force flex items to wrap. usually only needed when items used fixed size.
.flex-wrap Flex Wrap
Wrap Item 1
Wrap Item 2
Wrap Item 3
.flex-wrap-reverse Flex Wrap Reverse
Wrap Reverse Item 1
Wrap Reverse Item 2
Wrap Reverse Item 3
.flex-nowrap Flex No Wrap
No Wrap Item 1
No Wrap Item 2
No Wrap Item 3
Set horizontal alignment of content within the flex container.
.flex-justify-start Justify Flex Start
.flex-justify-end Justify Flex End
.flex-justify-center Justify Flex Center
.flex-justify-between Justify Flex Space Between
Item 1
Item 2
Item 3
.flex-justify-around Justify Flex Space Around
Item 1
Item 2
Item 3
.flex-justify-even Justify Flex Space Evenly
Item 1
Item 2
Item 3
Set vertical alignment of content within the flex container.
.flex-align-even Flex Y Start
Item 1
Item 2
Item 3
.flex-align-even Flex Y End
Item 1
Item 2
Item 3
.flex-align-even Flex Y Center
Item 1
Item 2
Item 3
.flex-align-even Flex Y Baseline
Item 1
Item 2
Item 3
.flex-align-even Flex Y Stretch
Item 1
Item 2
Item 3
Set alignment of a single item within the flex container.
Item 1
Item 2
Item 3
.flex-align-self-end Item 4
Implementation example:
Options:
Manually set flex item sizing based on ratios
e.g. 1-1-2 items will be a 25% 25% 50% row, 1-2 items a 33% 66% row, 1-3 25% 75%
.flex-grow-0 Flex Grow 0
Item 1
Item 2
Item 3
.flex-grow-1 Flex Grow 1
Item 1
Item 2
Item 3
.flex-grow-2 Flex Grow 2
Item 1
Item 2
Item 3
.flex-grow-3 Flex Grow 3
Item 1
Item 2
Item 3
.flex-grow-4 Flex Grow 4
Item 1
Item 2
Item 3
.flex-grow-6 Flex Grow 6
Item 1
Item 2
Item 3
Implementation example:
Options: