Compute_grid.NamedSourceInternal resolver for named grid lines and areas.
This module resolves CSS Grid line names and area names into concrete line numbers during layout computation. It processes grid-template-areas, grid-template-columns, and grid-template-rows to build lookup tables mapping names to line indices.
Construction proceeds in three phases:
Resolver mapping grid line names and area names to line numbers.
create style column_auto_repetitions row_auto_repetitions initializes a resolver from grid style properties.
Processes grid-template-areas, grid-template-columns, and grid-template-rows to build name-to-line mappings. Auto-repetition counts determine how many times auto-fill/auto-fit repeat() tracks expand.
The explicit row/column counts are initialized to 0 and must be set later via set_explicit_column_count and set_explicit_row_count.
area_column_count t returns the number of columns implied by grid areas.
area_row_count t returns the number of rows implied by grid areas.
set_explicit_column_count t count sets the explicit column count used for fallback line resolution.
set_explicit_row_count t count sets the explicit row count used for fallback line resolution.
explicit_column_count t returns the current explicit column count.
val resolve_row_names :
t ->
Style.Grid.Placement.t Geometry.Line.t ->
Style.Grid.Placement.t Geometry.Line.tresolve_row_names t line resolves named lines in row-axis grid placement to line numbers.
Converts Named_line placements to Line placements using the row line name map. Non-named placements pass through unchanged.
val resolve_column_names :
t ->
Style.Grid.Placement.t Geometry.Line.t ->
Style.Grid.Placement.t Geometry.Line.tresolve_column_names t line resolves named lines in column-axis grid placement to line numbers.
Converts Named_line placements to Line placements using the column line name map. Non-named placements pass through unchanged.
val resolve_absolutely_positioned_grid_tracks :
Style.Grid.Origin_zero_placement.t Geometry.Line.t ->
int option Geometry.Line.tresolve_absolutely_positioned_grid_tracks oz_placement computes the final track range for absolutely positioned items.
Handles all combinations of Line, Span, and Auto placements according to CSS Grid positioning rules. When both start and end are lines, ensures start <= end. Returns None boundaries for underspecified placements.