LengthPercentageOrAuto

Type Alias LengthPercentageOrAuto 

Source
pub type LengthPercentageOrAuto = GenericLengthPercentageOrAuto<LengthPercentage>;
Expand description

A computed type for <length-percentage> | auto.

Aliased Type§

#[repr(C, u8)]
pub enum LengthPercentageOrAuto { LengthPercentage(LengthPercentage), Auto, }

Variants§

§

LengthPercentage(LengthPercentage)

§

Auto

Implementations§

Source§

impl LengthPercentageOrAuto

Source

pub fn clamp_to_non_negative(self) -> Self

Clamps the value to a non-negative value.

Source

pub fn as_ref(&self) -> GenericLengthPercentageOrAuto<&LengthPercentage>

Convert to have a borrow inside the enum

Source

pub fn to_used_value(&self, percentage_basis: Au) -> Option<Au>

Returns the used value.