Type Alias LengthOrAuto

Source
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§

§

LengthPercentage(Length)

§

Auto

Implementations§

Source§

impl LengthOrAuto

Source

pub fn parse_quirky<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError<'i>>

Parses a length, allowing the unitless length quirk. https://quirks.spec.whatwg.org/#the-unitless-length-quirk