pub enum Length {
Px(f32),
Percent(f32),
Rem(f32),
Em(f32),
Vw(f32),
Vh(f32),
Dvh(f32),
Dvw(f32),
Auto,
Zero,
}Expand description
A CSS length value with unit
Variants§
Px(f32)
Pixels (px)
Percent(f32)
Percentage (%)
Rem(f32)
Root em (rem) - relative to root font size
Em(f32)
Em - relative to parent font size
Vw(f32)
Viewport width (vw)
Vh(f32)
Viewport height (vh)
Dvh(f32)
Dynamic viewport height (dvh) - treated as vh for layout
Dvw(f32)
Dynamic viewport width (dvw) - treated as vw for layout
Auto
Auto length
Zero
Zero (unitless)
Implementations§
Trait Implementations§
impl Copy for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze 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