Type Alias Inset

Source
pub type Inset = GenericInset<Percentage, LengthPercentage>;
Expand description

A specified value for inset types.

Aliased Type§

#[repr(C)]
pub enum Inset { LengthPercentage(LengthPercentage), Auto, AnchorFunction(Box<GenericAnchorFunction<Percentage, GenericInset<Percentage, LengthPercentage>>>), AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericInset<Percentage, LengthPercentage>>>), AnchorContainingCalcFunction(LengthPercentage), }

Variants§

§

LengthPercentage(LengthPercentage)

A <length-percentage> value.

§

Auto

An auto value.

§

AnchorFunction(Box<GenericAnchorFunction<Percentage, GenericInset<Percentage, LengthPercentage>>>)

§

AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericInset<Percentage, LengthPercentage>>>)

Inset defined by the size of the anchor element.

https://drafts.csswg.org/css-anchor-position-1/#anchor-pos

§

AnchorContainingCalcFunction(LengthPercentage)

A <length-percentage> value, guaranteed to contain calc(), which then is guaranteed to contain anchor() or anchor-size().

Implementations§

Source§

impl Inset

Source

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

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

Source

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

Source

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

Trait Implementations§

Source§

impl Parse for Inset

Source§

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

Parse a value of this type. Read more