Skip to main content

Module placement

Module placement 

Source
Expand description

Implements placing items in the grid and resolving the implicit grid. https://www.w3.org/TR/css-grid-1/#placement

FunctionsΒ§

advance_position πŸ”’
Advances the cursor by one track in the active search direction.
axis_is_reversed πŸ”’
Returns whether placement/search should run in reverse for this axis.
clamp_span_for_axis πŸ”’
Clamps a span using bounds transformed into the axis’s placement coordinates.
clamp_span_to_limited_grid πŸ”’
Clamp a placement into the limited grid, preserving a span of at least 1 track. Items placed outside of the limited grid are clamped into it.
maybe_mirror_span πŸ”’
Mirrors horizontal spans for RTL while leaving all other spans unchanged.
mirror_horizontal_span πŸ”’
Mirrors a horizontal span around the explicit grid width.
place_definite_grid_item πŸ”’
8.5. Grid Item Placement Algorithm Place a single definitely placed item into the grid
place_definite_secondary_axis_item πŸ”’
8.5. Grid Item Placement Algorithm Step 2. Place remaining children with definite secondary axis positions
place_grid_items πŸ”’
8.5. Grid Item Placement Algorithm Place items into the grid, generating new rows/column into the implicit grid as required
place_indefinitely_positioned_item πŸ”’
8.5. Grid Item Placement Algorithm Step 4. Position the remaining grid items.
record_grid_placement πŸ”’
Record the grid item in both CellOccupancyMatric and the GridItems list once a definite placement has been determined
resolve_indefinite_grid_span πŸ”’
Resolves an indefinite span at position, respecting the active axis direction.
search_start_line πŸ”’
Returns the initial search line for sparse/dense placement in the given axis direction.