Skip to main content

parse_transform_origin

Function parse_transform_origin 

Source
pub fn parse_transform_origin(
    value: &str,
) -> Option<(((f32, bool), (f32, bool)), Option<(f32, f32)>)>
Expand description

Parse a CSS transform-origin value into a raw ((x, is_pct), (y, is_pct)) pair plus the fraction already resolvable without the element box.

Resolved is Some only when both axes are keywords or percentages; plain lengths need the element box (unknown at build time) and stay None, leaving the runtime’s default center origin.