#[repr(u8)]pub enum AlignmentSafety {
Unsafe = 0,
Safe = 1,
}Expand description
The overflow-position modifier per CSS Box Alignment §4.3.
Safe falls back to start-edge alignment when the alignment subject would
overflow the alignment container, so the start of the content stays visible.
Unsafe (the default) keeps the requested alignment even when that causes
overflow at the start edge.
CSS only defines safe / unsafe against the position values start, end,
flex-start, flex-end, center. The struct shape does not enforce that
constraint at the type level — the parser rejects invalid combinations, and
the compute pass treats Safe paired with a non-position keyword (Stretch,
Baseline, Space*) the same as Unsafe.
Variants§
Unsafe = 0
Default — keeps the requested alignment even when the subject overflows the alignment container at the start edge.
Safe = 1
Falls back to the start edge when the subject would overflow, to avoid data loss.
Trait Implementations§
Source§impl Clone for AlignmentSafety
impl Clone for AlignmentSafety
Source§fn clone(&self) -> AlignmentSafety
fn clone(&self) -> AlignmentSafety
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more