pub type LengthOrAuto = LengthPercentageOrAuto<Length>;Expand description
Either a <length> or the auto keyword.
Note that we use LengthPercentage just for convenience, since it pretty much is everything we care about, but we could just add a similar LengthOrAuto instead if we think getting rid of this weirdness is worth it.
Aliased Type§
#[repr(C, u8)]pub enum LengthOrAuto {
LengthPercentage(Length),
Auto,
}Variants§
Implementations§
Source§impl LengthOrAuto
impl LengthOrAuto
Sourcepub fn parse_quirky(
context: &ParserContext<'_>,
input: &mut Parser<'_>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError>
pub fn parse_quirky( context: &ParserContext<'_>, input: &mut Parser<'_>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError>
Parses a length, allowing the unitless length quirk. https://quirks.spec.whatwg.org/#the-unitless-length-quirk