Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.75 KB

File metadata and controls

32 lines (24 loc) · 1.75 KB

AlignContent

Multi-line content alignment enumeration

Controls the distribution of space between and around content items along the cross axis in a multi-line flex container. This corresponds to the CSS align-content property.

Note: This property only has effect when flex-wrap is set to Wrap or WrapReverse.

Example

import { Style, AlignContent, FlexWrap } from "taffy-layout";

const style = new Style();
style.flexWrap = FlexWrap.Wrap;
style.alignContent = AlignContent.SpaceBetween; // Distribute lines evenly

Enumeration Members

Enumeration Member Value Description
Center 4 Lines centered within the container
End 1 Lines packed toward the end of the cross axis
FlexEnd 3 Lines packed toward the end of the flex container
FlexStart 2 Lines packed toward the start of the flex container
SpaceAround 7 Lines evenly distributed with equal space around each
SpaceBetween 6 Lines evenly distributed with first/last at edges
SpaceEvenly 8 Lines evenly distributed with equal space between each
Start 0 Lines packed toward the start of the cross axis
Stretch 5 Lines stretched to fill the container