Skip to main content

place_grid_items

Function place_grid_items 

Source
pub(super) fn place_grid_items(
    cell_occupancy_matrix: &mut CellOccupancyMatrix,
    items: &mut [GridItem],
    placements: &[InBothAbsAxis<Line<GenericGridPlacement<OriginZeroLine>>>],
    grid_auto_flow: GridAutoFlow,
)
Expand description

8.5. Grid Item Placement Algorithm Place items into the grid, generating new rows/column into the implicit grid as required

items and placements are parallel slices in document order: placements[i] holds the grid-row/grid-column styles of items[i], with named lines already resolved. The placement passes run over these (small) values rather than re-reading the children’s styles.

Specification