pub(crate) fn compute_alignment_offset(
free_space: f32,
num_items: usize,
gap: f32,
alignment_mode: AlignContent,
layout_is_flex_reversed: bool,
is_first: bool,
) -> f32
Expand description
Generic alignment function that is used:
- For both align-content and justify-content alignment
- For both the Flexbox and CSS Grid algorithms
CSS Grid does not apply gaps as part of alignment, so the gap parameter should always be set to zero for CSS Grid.