pub enum LineHeightSpec {
Multiplier(f32),
Px(f32),
}Expand description
CSS line-height value. Unlike LengthSpec, the two forms carry
different meanings rather than different units of the same quantity:
a bare number (line-height: 1.2) scales with the element’s own
font size, while a px value (line-height: 19px) is a fixed line
box height that does not track font-size changes. Kept as two
variants instead of collapsing to a single px number so a consumer
can tell which behavior the author asked for.
Variants§
Multiplier(f32)
Unitless multiplier of the element’s font size (CSS normal-like
scaling behavior).
Px(f32)
Fixed line height in px, independent of font size.
Trait Implementations§
Source§impl Clone for LineHeightSpec
impl Clone for LineHeightSpec
Source§fn clone(&self) -> LineHeightSpec
fn clone(&self) -> LineHeightSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineHeightSpec
impl Debug for LineHeightSpec
Source§impl<'de> Deserialize<'de> for LineHeightSpec
impl<'de> Deserialize<'de> for LineHeightSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LineHeightSpec
impl PartialEq for LineHeightSpec
Source§fn eq(&self, other: &LineHeightSpec) -> bool
fn eq(&self, other: &LineHeightSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LineHeightSpec
impl Serialize for LineHeightSpec
impl Copy for LineHeightSpec
impl StructuralPartialEq for LineHeightSpec
Auto Trait Implementations§
impl Freeze for LineHeightSpec
impl RefUnwindSafe for LineHeightSpec
impl Send for LineHeightSpec
impl Sync for LineHeightSpec
impl Unpin for LineHeightSpec
impl UnsafeUnpin for LineHeightSpec
impl UnwindSafe for LineHeightSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.