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
impl Size
sourcepub fn to_used_value(&self, percentage_basis: Au) -> Option<Au>
pub fn to_used_value(&self, percentage_basis: Au) -> Option<Au>
Convert the computed value into used value.
sourcepub fn maybe_to_used_value(&self, percentage_basis: Option<Au>) -> Option<Au>
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.
sourcepub fn is_definitely_zero(&self) -> bool
pub fn is_definitely_zero(&self) -> bool
Returns true if the computed value is absolute 0 or 0%.