pub struct AlignContent {
pub keyword: AlignContentKeyword,
pub safety: AlignmentSafety,
}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.
Fields§
§keyword: AlignContentKeywordPosition keyword.
safety: AlignmentSafetyOverflow-position modifier (safe / unsafe).
Implementations§
Source§impl AlignContent
impl AlignContent
Sourcepub const FLEX_START: Self
pub const FLEX_START: Self
Items are packed towards the flex-relative start of the axis.
Sourcepub const SPACE_BETWEEN: Self
pub const SPACE_BETWEEN: Self
The first and last items are aligned flush with the edges of the container.
Sourcepub const SPACE_EVENLY: Self
pub const SPACE_EVENLY: Self
The gap between the first and last items equals the gap between items.
Sourcepub const SPACE_AROUND: Self
pub const SPACE_AROUND: Self
The gap between the first and last items is half the gap between items.
Sourcepub const SAFE_START: Self
pub const SAFE_START: Self
Like AlignContent::START, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_END: Self
pub const SAFE_END: Self
Like AlignContent::END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_START: Self
pub const SAFE_FLEX_START: Self
Like AlignContent::FLEX_START, but falls back to AlignContent::START when
the content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_END: Self
pub const SAFE_FLEX_END: Self
Like AlignContent::FLEX_END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_CENTER: Self
pub const SAFE_CENTER: Self
Like AlignContent::CENTER, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const fn is_safe(self) -> bool
pub const fn is_safe(self) -> bool
Returns true iff this carries the safe overflow-position modifier.
Sourcepub const fn keyword(self) -> AlignContentKeyword
pub const fn keyword(self) -> AlignContentKeyword
Returns the underlying position keyword, discarding the safety modifier.
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 more