The foundation of our CSS flex utilities are sourced from SUIT CSS:
u-flex
- Create a flex containeru-flexInline
- Create an inline flex containerAll flex utilities can be limited to specific breakpoints:
u-sm-flexX
- To use at the smallest Media Query breakpoint.u-md-flexX
- To use at the medium Media Query breakpoint.u-lg-flexX
- To use at the largest Media Query breakpoint.u-flexRow
- Displays items in a rowu-flexRowReverse
- Reverses items in a rowu-flexCol
- Display items in a columnu-flexColReverse
- Reverses items in a columnu-flexWrap
- Wrap items onto another line when space allowsu-flexNoWrap
- Force items to stay on one lineu-flexWrapReverse
- Wrap items and reverse directionu-flexJustifyStart
- Align items at the start of the main axisu-flexJustifyEnd
- Align items at the end of the main axisu-flexJustifyCenter
- Align items at the center of the main axisu-flexJustifyBetween
- Items have space between each other on main axisu-flexJustifyAround
- Items have space around each other on main axisu-flexAlignItemsStretch
- Items stretch to fill containeru-flexAlignItemsStart
- Cross-start margin edge of the items is placed on the cross-start lineu-flexAlignItemsEnd
- Cross-end margin edge of the items is placed on the cross-end lineu-flexAlignItemsCenter
- Items are centered in the cross-axisu-flexAlignItemsBaseline
- Items have their baselines aligned on the cross axisu-flexAlignContentStart
- Items are packed to the start of the containeru-flexAlignContentEnd
- Items are packed to the end of the containeru-flexAlignContentCenter
- Items are packed to the centre of the containeru-flexAlignContentStretch
- Lines stretch to take up the remaining spaceu-flexAlignContentBetween
- Lines evenly distributed; first and last lines at container edgeu-flexAlignContentAround
- Lines evenly distributed with equal space around each lineu-flexAlignSelfStart
- Aligns single item at cross axis startu-flexAlignSelfEnd
- Aligns single item at cross axis endu-flexAlignSelfCenter
- Aligns single item at cross axis centreu-flexAlignSelfStretch
- Stretches single item from cross start to endu-flexAlignSelfAuto
- Uses the default set by align-items
u-flexOrderFirst
- Positions an item at the startu-flexOrderLast
- Positions an item at the endu-flexOrderNone
- Sets item order to the default of 0
u-flexGrowX
- Specify how much the flex item will grow relativelyX
can be any of the following numbers: 1
, 2
, 3
, 4
, 5
.
u-flexShrinkX
- Specify how much the flex item will shrink relativelyX
can be any of the following numbers: 0
, 1
, 2
, 3
, 4
, 5
.
Used to override other utilities and tweak how space is distributed.
u-flexBasisAuto
u-flexBasis0
u-flexInitial
- Sizes the item based on the width/height propertiesu-flexAuto
- Sizes the item based on the width/height properties, but makes
them fully flexible, so that they absorb any free space along the main axis.u-flexNone
- Sizes the item according to the width/height properties, but
makes the flex item fully inflexible. Similar to initial, except that flex
items are not allowed to shrink, even in overflow situations.u-flexExpand
- Expand all margins to fill remaining spaceu-flexExpandTop
- Expand top margin to fill remaining spaceu-flexExpandRight
- Expand right margin to fill remaining spaceu-flexExpandBottom
- Expand bottom margin to fill remaining spaceu-flexExpandLeft
- Expand left margin to fill remaining spaceSpecific to this project, we've added some additional shorthand classes:
u-flexExpandEnds
- Expand top and bottom marginsu-flexExpandSides
- Expand left and right margins