Enum taffy::style::AlignContent
source · pub enum AlignContent {
Start,
End,
FlexStart,
FlexEnd,
Center,
Stretch,
SpaceBetween,
SpaceEvenly,
SpaceAround,
}
Expand description
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
Variants§
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.
For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to End. In all other cases it is equivalent to Start.
FlexEnd
Items are packed towards the flex-relative end of the axis.
For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to Start. In all other cases it is equivalent to End.
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.
Trait Implementations§
source§impl Clone for AlignContent
impl Clone for AlignContent
source§fn clone(&self) -> AlignContent
fn clone(&self) -> AlignContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AlignContent
impl Debug for AlignContent
source§impl PartialEq for AlignContent
impl PartialEq for AlignContent
source§fn eq(&self, other: &AlignContent) -> bool
fn eq(&self, other: &AlignContent) -> bool
self
and other
values to be equal, and is used
by ==
.