pub enum LengthUnit {
Show 49 variants
Px,
Cm,
Mm,
Q,
In,
Pc,
Pt,
Em,
Rem,
Ex,
Rex,
Cap,
Rcap,
Ch,
Rch,
Ic,
Ric,
Lh,
Rlh,
Vw,
Vh,
Vi,
Vb,
Vmin,
Vmax,
Svw,
Svh,
Svi,
Svb,
Svmin,
Svmax,
Lvw,
Lvh,
Lvi,
Lvb,
Lvmin,
Lvmax,
Dvw,
Dvh,
Dvi,
Dvb,
Dvmin,
Dvmax,
Cqw,
Cqh,
Cqi,
Cqb,
Cqmin,
Cqmax,
}Expand description
A CSS length unit.
Variants§
Px
CSS pixels (px), 1/96th of an inch.
Cm
Centimeters (cm).
Mm
Millimeters (mm), 1/10th of a centimeter.
Q
Quarter-millimeters (Q), 1/40th of a centimeter.
In
Inches (in), 2.54 centimeters.
Pc
Picas (pc), 1/6th of an inch.
Pt
Points (pt), 1/72nd of an inch.
Em
The element’s font size (em).
Rem
The root element’s font size (rem).
Ex
The x-height of the element’s font (ex).
Rex
The x-height of the root element’s font (rex).
Cap
The cap height of the element’s font (cap).
Rcap
The cap height of the root element’s font (rcap).
Ch
The advance of the 0 glyph in the element’s font (ch).
Rch
The advance of the 0 glyph in the root element’s font (rch).
Ic
The advance of a fullwidth glyph in the element’s font (ic).
Ric
The advance of a fullwidth glyph in the root element’s font (ric).
Lh
The line height of the element (lh).
Rlh
The line height of the root element (rlh).
Vw
1% of the viewport’s width (vw).
Vh
1% of the viewport’s height (vh).
Vi
1% of the viewport’s inline-axis size (vi).
Vb
1% of the viewport’s block-axis size (vb).
Vmin
1% of the viewport’s smaller dimension (vmin).
Vmax
1% of the viewport’s larger dimension (vmax).
Svw
1% of the small viewport’s width (svw).
Svh
1% of the small viewport’s height (svh).
Svi
1% of the small viewport’s inline-axis size (svi).
Svb
1% of the small viewport’s block-axis size (svb).
Svmin
1% of the small viewport’s smaller dimension (svmin).
Svmax
1% of the small viewport’s larger dimension (svmax).
Lvw
1% of the large viewport’s width (lvw).
Lvh
1% of the large viewport’s height (lvh).
Lvi
1% of the large viewport’s inline-axis size (lvi).
Lvb
1% of the large viewport’s block-axis size (lvb).
Lvmin
1% of the large viewport’s smaller dimension (lvmin).
Lvmax
1% of the large viewport’s larger dimension (lvmax).
Dvw
1% of the dynamic viewport’s width (dvw).
Dvh
1% of the dynamic viewport’s height (dvh).
Dvi
1% of the dynamic viewport’s inline-axis size (dvi).
Dvb
1% of the dynamic viewport’s block-axis size (dvb).
Dvmin
1% of the dynamic viewport’s smaller dimension (dvmin).
Dvmax
1% of the dynamic viewport’s larger dimension (dvmax).
Cqw
1% of the query container’s width (cqw).
Cqh
1% of the query container’s height (cqh).
Cqi
1% of the query container’s inline size (cqi).
Cqb
1% of the query container’s block size (cqb).
Cqmin
1% of the query container’s smaller dimension (cqmin).
Cqmax
1% of the query container’s larger dimension (cqmax).
Implementations§
Trait Implementations§
Source§impl Clone for LengthUnit
impl Clone for LengthUnit
Source§fn clone(&self) -> LengthUnit
fn clone(&self) -> LengthUnit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LengthUnit
Source§impl Debug for LengthUnit
impl Debug for LengthUnit
Source§impl Display for LengthUnit
impl Display for LengthUnit
impl Eq for LengthUnit
Source§impl PartialEq for LengthUnit
impl PartialEq for LengthUnit
impl StructuralPartialEq for LengthUnit
Auto Trait Implementations§
impl Freeze for LengthUnit
impl RefUnwindSafe for LengthUnit
impl Send for LengthUnit
impl Sync for LengthUnit
impl Unpin for LengthUnit
impl UnsafeUnpin for LengthUnit
impl UnwindSafe for LengthUnit
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.