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§
- Detailed
Grid Info - Information from the computation of grid
- Detailed
Grid Items Info - Grid area information from the placement algorithm
- Detailed
Grid Tracks Info - Information from the computation of grids tracks
- Grid
Container 🔒Constants - 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.