Skip to main content

Module alignment

Module alignment 

Source
Expand description

Generic CSS alignment code that is shared between both the Flexbox and CSS Grid algorithms.

Functionsยง

apply_alignment_fallback ๐Ÿ”’
Resolve any spec-defined fallbacks for the given AlignContent value, returning the bare position keyword the alignment math should use.
child_first_baseline ๐Ÿ”’
The first baseline of a child box (measured from the top of its border box, like crate::Baselines) as used for baseline alignment and for determining its containerโ€™s baseline, given the baseline it reported, its border-box height, and its vertical overflow.
compute_alignment_offset ๐Ÿ”’
Generic alignment function that is used:
resolve_self_alignment_safety ๐Ÿ”’
Resolve the safe/unsafe overflow-position fallback for a self-level alignment value (used by align-self / justify-self-style sites and by absolutely-positioned items in flex/grid). If the alignment subject overflows its alignment container and the requested alignment is safe, fall back to logical Start per CSS Box Alignment https://www.w3.org/TR/css-align-3/#overflow-values. Otherwise drop the safety modifier and return the bare keyword.