Skip to main content

Module grid

Module grid 

Source
Expand description

§CSS Grid Layout

Implements a subset of CSS Grid for 2D layouts within the page-native layout engine. Supports:

  • Fixed (pt), fractional (fr), and auto track sizing
  • MinMax track sizes
  • Explicit grid placement (column/row start/end/span)
  • Auto-placement (row-major sparse)
  • Row/column gap
  • Page breaks at row boundaries

Structs§

GridItemPlacement
Resolved grid item placement in the grid.

Functions§

column_x_offset
Compute the x-offset for a column, accounting for gaps.
compute_num_rows
Compute the number of rows needed based on item placements.
place_items
Place items in the grid using explicit placement + auto-placement.
resolve_tracks
Resolve track sizes to concrete widths/heights in points.
span_width
Compute the width of a multi-column span.