Module grid

Source
Expand description

This module is a partial implementation of the CSS Grid Level 1 specification https://www.w3.org/TR/css-grid-1

ModulesΒ§

alignment πŸ”’
Alignment of tracks and final positioning of items
explicit_grid πŸ”’
Helper functions for initialising GridTrack’s from styles This mainly consists of evaluating GridAutoTracks
implicit_grid πŸ”’
This module is not required for spec compliance, but is used as a performance optimisation to reduce the number of allocations required when creating a grid.
placement πŸ”’
Implements placing items in the grid and resolving the implicit grid. https://www.w3.org/TR/css-grid-1/#placement
track_sizing πŸ”’
Implements the track sizing algorithm https://www.w3.org/TR/css-grid-1/#layout-algorithm
types πŸ”’
Structs and enums that are used within the grid module
util πŸ”’
Utility functions used within the grid module

StructsΒ§

DetailedGridInfo
Information from the computation of grid
DetailedGridItemsInfo
Grid area information from the placement algorithm
DetailedGridTracksInfo
Information from the computation of grids tracks

FunctionsΒ§

compute_grid_layout
Grid layout algorithm This consists of a few phases: