pub type NonNegativeLengthPercentageOrAuto = LengthPercentageOrAuto<NonNegativeLengthPercentage>;
Expand description
A wrapper of LengthPercentageOrAuto, whose value must be >= 0.
Aliased Type§
enum NonNegativeLengthPercentageOrAuto {
LengthPercentage(NonNegative<LengthPercentage>),
Auto,
}
Variants§
LengthPercentage(NonNegative<LengthPercentage>)
Auto
Implementations§
source§impl NonNegativeLengthPercentageOrAuto
impl NonNegativeLengthPercentageOrAuto
sourcepub fn zero_percent() -> Self
pub fn zero_percent() -> Self
Returns a value representing 0%
.
sourcepub fn parse_quirky<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError<'i>>
pub fn parse_quirky<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError<'i>>
Parses a non-negative length-percentage, allowing the unitless length quirk.