Skip to main content

resolve_absolute_sizing_keywords

Function resolve_absolute_sizing_keywords 

Source
pub(crate) fn resolve_absolute_sizing_keywords(
    tree: &mut impl LayoutPartialTree,
    node: NodeId,
    known_dimensions: &mut Size<Option<f32>>,
    size_style: Size<Dimension>,
    area_size: Size<f32>,
    inset: Rect<Option<f32>>,
    margin: Rect<Option<f32>>,
    sizing_mode: SizingMode,
)
Expand description

Resolve the sizing keywords (min-content, max-content, fit-content, fit-content(...), and stretch) on the size styles of an absolutely positioned item, filling in the corresponding known_dimensions axes.

  • area_size is the size of the item’s containing block (which insets and percentages resolve against).
  • The stretch size in each axis is the containing block minus the item’s insets and margins in that axis.