pub type LengthPercentageOrAuto = LengthPercentageOrAuto<LengthPercentage>;
Expand description
A specified type for <length-percentage> | auto
.
Aliased Type§
enum LengthPercentageOrAuto {
LengthPercentage(LengthPercentage),
Auto,
}
Variants§
LengthPercentage(LengthPercentage)
Auto
Implementations§
source§impl LengthPercentageOrAuto
impl LengthPercentageOrAuto
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 length or a percentage, allowing the unitless length quirk. https://quirks.spec.whatwg.org/#the-unitless-length-quirk