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.
In Flexbox, this property distributes wrapped lines. In Grid it aligns row tracks; in block layout it aligns the block content vertically.
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 |
SafeCenter | 13 | Safe center alignment that avoids start-edge overflow |
SafeEnd | 10 | Safe end alignment that avoids start-edge overflow |
SafeFlexEnd | 12 | Safe flex-end alignment that avoids start-edge overflow |
SafeFlexStart | 11 | Safe flex-start alignment that avoids start-edge overflow |
SafeStart | 9 | Safe start alignment that avoids start-edge overflow |
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 |