pub enum Length {
Auto,
Px(f32),
Percent(f32),
Fraction(f32),
ViewportWidth(f32),
ViewportHeight(f32),
}Expand description
CSS-compatible deterministic layout length unit.
Variants§
Auto
Automatic size determined by content or parent constraints.
Px(f32)
Device-independent logical pixels.
Percent(f32)
Percentage of the parent container’s dimension in [0.0, 100.0].
Fraction(f32)
Fraction of remaining free space for grid tracks (fr).
ViewportWidth(f32)
Percentage of the root viewport width (vw).
ViewportHeight(f32)
Percentage of the root viewport height (vh).
Implementations§
Trait Implementations§
impl Copy for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Forget for Length
impl Freeze for Length
impl Move for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnsafeUnpin for Length
impl UnwindSafe for Length
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more