Skip to main content

Module grid

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

Re-exports§

pub use types::GridLineNames;
pub use types::GridLineNamesIter;

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
GridContainerConstants 🔒
The grid container’s resolved box, size constraints, alignment styles and available space, computed once from the container’s style and the layout inputs before the grid is laid out

Functions§

compute_container_constants 🔒
Resolve the grid container’s style against the layout inputs (step 1 of compute_grid_layout)
compute_grid_layout
Grid layout algorithm This consists of a few phases:
resolve_static_position_grid_area 🔒
Resolve the static-position rectangle (the grid area determined by the grid-placement properties) for an out-of-flow child of a positioned grid container.