Type Alias style::values::specified::length::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§

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