AlignSelf
Cross-axis alignment enumeration for a single element
Overrides the parent's align-items value for a specific child element.
This corresponds to the CSS align-self property.
Example
import { Style, AlignSelf } from "taffy-layout"; const style = new Style(); style.alignSelf = AlignSelf.Auto; // Use parent's align-items style.alignSelf = AlignSelf.Center; // Override to center this item
Enumeration Members
| Enumeration Member | Value | Description |
|---|---|---|
Auto | 0 | Inherits the parent container's align-items value |
Baseline | 6 | Item aligned to its text baseline |
Center | 5 | Item centered along the cross axis |
End | 2 | Item aligned to the end of the cross axis |
FlexEnd | 4 | Item aligned to the end of the flex container |
FlexStart | 3 | Item aligned to the start of the flex container |
SafeCenter | 14 | Safe center alignment that avoids start-edge overflow |
SafeEnd | 11 | Safe end alignment that avoids start-edge overflow |
SafeFlexEnd | 13 | Safe flex-end alignment that avoids start-edge overflow |
SafeFlexStart | 12 | Safe flex-start alignment that avoids start-edge overflow |
SafeSelfEnd | 16 | Safe self-end alignment that avoids start-edge overflow |
SafeSelfStart | 15 | Safe self-start alignment that avoids start-edge overflow |
SafeStart | 10 | Safe start alignment that avoids start-edge overflow |
SelfEnd | 9 | Item aligned to the end edge determined by its own direction |
SelfStart | 8 | Item aligned to the start edge determined by its own direction |
Start | 1 | Item aligned to the start of the cross axis |
Stretch | 7 | Item stretched to fill the container |