Type Alias Margin

Source
pub type Margin = GenericMargin<LengthPercentage>;
Expand description

A specified value for margin properties.

Aliased Type§

#[repr(C)]
pub enum Margin { LengthPercentage(LengthPercentage), Auto, AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericMargin<LengthPercentage>>>), AnchorContainingCalcFunction(LengthPercentage), }

Variants§

§

LengthPercentage(LengthPercentage)

A <length-percentage> value.

§

Auto

An auto value.

§

AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericMargin<LengthPercentage>>>)

Margin size defined by the anchor element.

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

§

AnchorContainingCalcFunction(LengthPercentage)

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

Implementations§

Source§

impl Margin

Source

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

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

Trait Implementations§

Source§

impl Parse for Margin

Source§

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

Parse a value of this type. Read more