Expand description
Style types for controlling alignment.
The public alignment types (AlignItems, AlignContent, and their aliases) are
structs with two orthogonal fields: a position keyword
(AlignItemsKeyword / AlignContentKeyword) and an overflow-position
modifier (AlignmentSafety). The pre-existing CSS spellings — Start, End,
FlexStart, FlexEnd, Center, Stretch, SpaceBetween, …, SafeStart,
SafeEnd, SafeFlexStart, SafeFlexEnd, SafeCenter — are exposed as associated
constants on the structs, so call sites read identically to the previous enum form.
Structs§
- Align
Content - Sets the distribution of space between and around content items. For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.
- Align
Items - Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.
Enums§
- Align
Content Keyword - The position-keyword half of
AlignContent(and its aliasJustifyContent). - Align
Items Keyword - The position-keyword half of
AlignItems(and its aliasesAlignSelf,JustifyItems,JustifySelf). - Alignment
Safety - The overflow-position modifier per CSS Box Alignment §4.3.
Type Aliases§
- Align
Self - Controls alignment of an individual node.
- Justify
Content - Sets the distribution of space between and around content items. For Flexbox it controls alignment in the main axis. For Grid it controls alignment in the inline axis.
- Justify
Items - Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container. For Grid it controls alignment in the inline axis.
- Justify
Self - Controls alignment of an individual node.