Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.43 KB

File metadata and controls

29 lines (22 loc) · 1.43 KB

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
Start 1 Item aligned to the start of the cross axis
Stretch 7 Item stretched to fill the container