pub enum Dimension {
LengthAbs,
LengthVw,
LengthVh,
LengthVx,
LengthRem,
LenghtEm,
Angle,
Time,
Frequency,
Resolution,
None,
Unknown(String),
}
Expand description
Dimension of a unit.
Units of the same dimension can be converted to each other. There are multiple “length” dimensions, since font-based, window-based and absolute lengths can’t be converted to each other.
This type is for compatibility in sass functions.
See also CssDimension
.
Variants§
LengthAbs
An absolute length, can be converted to metric.
LengthVw
A length relative to viewport width.
LengthVh
A length relative to viewport height.
LengthVx
A length relative to viewport size (min or max).
LengthRem
A length relatvie to base font size.
LenghtEm
A length relative to font size.
Angle
An angle.
Time
A duration.
Frequency
A frequency.
Resolution
A resolution (number of pixels per length).
None
No dimension (no unit, percentage, or grid fraction).
Unknown(String)
The dimension of an unknown (but named) unit.
Trait Implementations§
source§impl From<Dimension> for CssDimension
impl From<Dimension> for CssDimension
source§impl Ord for Dimension
impl Ord for Dimension
source§impl PartialEq for Dimension
impl PartialEq for Dimension
source§impl PartialOrd for Dimension
impl PartialOrd for Dimension
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Dimension
impl StructuralEq for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
impl RefUnwindSafe for Dimension
impl Send for Dimension
impl Sync for Dimension
impl Unpin for Dimension
impl UnwindSafe for Dimension
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