pub type AnchorFunction = GenericAnchorFunction<Percentage, Inset>;Expand description
A specified value for anchor() function.
Aliased Type§
#[repr(C)]pub struct AnchorFunction {
pub target_element: TreeScoped<DashedIdent>,
pub side: GenericAnchorSide<Percentage>,
pub fallback: Optional<GenericInset<Percentage, LengthPercentage>>,
}Fields§
§target_element: TreeScoped<DashedIdent>Anchor name of the element to anchor to. If omitted, selects the implicit anchor element. The shadow cascade order of the tree-scoped anchor name associates the name with the host of the originating stylesheet.
side: GenericAnchorSide<Percentage>Where relative to the target anchor element to position the anchored element to.
fallback: Optional<GenericInset<Percentage, LengthPercentage>>Value to use in case the anchor function is invalid.
Trait Implementations§
Source§impl Parse for AnchorFunction
impl Parse for AnchorFunction
Source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more