pub enum Unit {
Show 15 variants
Cm,
Mm,
In,
Px,
Pt,
Pc,
Em,
Ex,
Ch,
Rem,
Vw,
Vh,
VMin,
VMax,
Percent,
}
Variants§
Cm
Centimeters
Mm
Millieters
In
Inches
Px
Pixels
Pt
Points
Pc
Picas
Em
Relative to the font-size of the element
Ex
Relative to the x-height of the current font
Ch
Relative to the width of the “0”
Rem
Relative to font-size of the root element
Vw
Relative to 1% of the width of the viewport*
Vh
Relative to 1% of the height of the viewport*
VMin
Relative to 1% of viewport’s* smaller dimension
VMax
Relative to 1% of viewport’s* larger dimension
Percent
Relative to the parent element
Trait Implementations§
impl Copy for Unit
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
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