Type Alias JustifyContent

Source
pub type JustifyContent = AlignContent;
Expand description

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.

Aliased Type§

pub enum JustifyContent {
    None,
    Start,
    End,
    FlexStart,
    FlexEnd,
    Center,
    Stretch,
    SpaceBetween,
    SpaceEvenly,
    SpaceAround,
}

Variants§

§

None

Items are placed as-is.

§

Start

Items are packed toward the start of the axis.

§

End

Items are packed toward the end of the axis.

§

FlexStart

Items are packed towards the flex-relative start of the axis.

§

FlexEnd

Items are packed towards the flex-relative end of the axis.

§

Center

Items are centered around the middle of the axis.

§

Stretch

Items are stretched to fill the container.

§

SpaceBetween

The first and last items are aligned flush with the edges of the container (no gap) The gap between items is distributed evenly.

§

SpaceEvenly

The gap between the first and last items is exactly the same as the gap between items. The gaps are distributed evenly

§

SpaceAround

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.