Type Alias style::values::computed::length::Size

source ·
pub type Size = GenericSize<NonNegativeLengthPercentage>;
Expand description

A computed value for min-width, min-height, width or height property.

Aliased Type§

enum Size {
    LengthPercentage(NonNegative<LengthPercentage>),
    Auto,
    MaxContent,
    MinContent,
    FitContent,
    Stretch,
    AnchorSizeFunction(Box<GenericAnchorSizeFunction<NonNegative<LengthPercentage>>>),
}

Variants§

§

LengthPercentage(NonNegative<LengthPercentage>)

§

Auto

§

MaxContent

§

MinContent

§

FitContent

§

Stretch

§

AnchorSizeFunction(Box<GenericAnchorSizeFunction<NonNegative<LengthPercentage>>>)

Implementations§

source§

impl Size

source

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

Convert the computed value into used value.

source

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

Convert the computed value into used value if there is enough information.

source

pub fn is_definitely_zero(&self) -> bool

Returns true if the computed value is absolute 0 or 0%.