pub type LengthPercentageOrAuto = GenericLengthPercentageOrAuto<LengthPercentage>;
Expand description
A computed type for <length-percentage> | auto
.
Aliased Type§
enum LengthPercentageOrAuto {
LengthPercentage(LengthPercentage),
Auto,
}
Variants§
LengthPercentage(LengthPercentage)
Auto
Implementations§
source§impl LengthPercentageOrAuto
impl LengthPercentageOrAuto
sourcepub fn clamp_to_non_negative(self) -> Self
pub fn clamp_to_non_negative(self) -> Self
Clamps the value to a non-negative value.
sourcepub fn as_ref(&self) -> GenericLengthPercentageOrAuto<&LengthPercentage>
pub fn as_ref(&self) -> GenericLengthPercentageOrAuto<&LengthPercentage>
Convert to have a borrow inside the enum
sourcepub fn to_used_value(&self, percentage_basis: Au) -> Option<Au>
pub fn to_used_value(&self, percentage_basis: Au) -> Option<Au>
Returns the used value.
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%.