Expand description
Constrained flex layout engine supporting single-line and multi-line wrapping.
Provides:
- Single-line flex layout (
FlexDirection::Row,Column,RowReverse,ColumnReverse). - Multi-line flex wrapping (
FlexWrap::Wrap,FlexWrap::WrapReverse, FIX-WRP-001, FIX-WRP-002, FIX-WRP-003). - Line formation with strict fractional breakpoint handling (FIX-WRP-005).
- Cross-axis line distribution (
AlignContent::Start,End,Center,Stretch,SpaceBetween,SpaceAround,SpaceEvenly, FIX-WRP-004). - Reverse cross-line stacking under
FlexWrap::WrapReverse(FIX-WRP-003). - Flex basis determination (explicit
flex_basis, main-axissize, or auto content size). - Iterative constrained grow with max-size clamp freezing (FIX-FLX-003).
- Iterative constrained shrink with min-size floor freezing and zero-shrink items (FIX-FLX-004, FIX-FLX-005).
- Gaps along main and cross axes (
gap.width,gap.height, FIX-FLX-001, FIX-FLX-002). - Reverse flow positioning (
RowReverse,ColumnReverse, FIX-FLX-006, FIX-FLX-007). - Content justification (
Start,End,Center,SpaceBetween,SpaceAround,SpaceEvenly, FIX-FLX-008, FIX-FLX-009). - Cross-axis alignment (
Start,End,Center,Stretch,Baseline) and per-itemalign_selfoverride (FIX-FLX-010, FIX-FLX-011). - Asymmetric padding insets and margin offsets (FIX-FLX-012).
- Parent-local coordinate placement with strict numerical invariants.
Structs§
- Flex
Item - A single flex item being resolved within a flex container.
Functions§
- compute_
flex - Computes flex layout for a container and its in-flow children,
automatically handling single-line or multi-line wrapping according to
container_style.flex_wrap. - compute_
multi_ line_ flex - Computes multi-line flex layout (
FlexWrap::WraporFlexWrap::WrapReverse). - compute_
single_ line_ flex - Computes single-line flex layout for a container and its in-flow children.
- to_
align_ self - Converts container
AlignItemsto equivalent itemAlignSelf.