Skip to main content

apply_alignment_fallback

Function apply_alignment_fallback 

Source
pub(crate) fn apply_alignment_fallback(
    free_space: f32,
    num_items: usize,
    alignment_mode: AlignContent,
) -> AlignContentKeyword
Expand description

Resolve any spec-defined fallbacks for the given AlignContent value, returning the bare position keyword the alignment math should use.

In addition to the spec at https://www.w3.org/TR/css-align-3/ this implementation follows the resolution of https://github.com/w3c/csswg-drafts/issues/10154.