#[repr(u8)]pub enum AlignContentKeyword {
Start = 0,
End = 1,
FlexStart = 2,
FlexEnd = 3,
Center = 4,
Stretch = 5,
SpaceBetween = 6,
SpaceEvenly = 7,
SpaceAround = 8,
}Expand description
The position-keyword half of AlignContent (and its alias JustifyContent).
Compute paths match on this enum directly so every match is exhaustive and
requires no Safe* siblings.
Variants§
Start = 0
Items are packed toward the start of the axis.
End = 1
Items are packed toward the end of the axis.
FlexStart = 2
Items are packed towards the flex-relative start of the axis.
FlexEnd = 3
Items are packed towards the flex-relative end of the axis.
Center = 4
Items are centered around the middle of the axis.
Stretch = 5
Items are stretched to fill the container.
SpaceBetween = 6
The first and last items are aligned flush with the edges of the container (no gap). The gap between items is distributed evenly.
SpaceEvenly = 7
The gap between the first and last items is exactly THE SAME as the gap between items. The gaps are distributed evenly.
SpaceAround = 8
The gap between the first and last items is exactly HALF the gap between items. The gaps are distributed evenly in proportion to these ratios.
Implementations§
Source§impl AlignContentKeyword
impl AlignContentKeyword
Sourcepub(crate) fn reversed(self) -> Self
pub(crate) fn reversed(self) -> Self
Returns the reversed keyword for RTL (right-to-left) contexts: Start↔End,
FlexStart↔FlexEnd. Stretch maps to End to preserve the layout
algorithms’ historical handling. Center and the distribution keywords
(SpaceBetween, SpaceEvenly, SpaceAround) are unaffected because their
visual placement is direction-symmetric.
Trait Implementations§
Source§impl Clone for AlignContentKeyword
impl Clone for AlignContentKeyword
Source§fn clone(&self) -> AlignContentKeyword
fn clone(&self) -> AlignContentKeyword
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more