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
AlignContentvalue, 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 verticaloverflow. - compute_
alignment_ ๐offset - Generic alignment function that is used:
- resolve_
self_ ๐alignment_ safety - Resolve the
safe/unsafeoverflow-position fallback for a self-level alignment value (used byalign-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 issafe, fall back to logicalStartper CSS Box Alignment https://www.w3.org/TR/css-align-3/#overflow-values. Otherwise drop the safety modifier and return the bare keyword.