Expand description
llimphi-layout — Física del Espacio.
Wrapper sobre taffy que resuelve árboles flex/grid y devuelve
coordenadas absolutas (no relativas al padre). El consumidor pasa el
árbol a compute(root, viewport) y obtiene un ComputedLayout con
un rect absoluto por nodo, listo para llimphi-raster.
Re-exports§
pub use taffy;
Structs§
- Compact
Length - A representation of a length as a compact 64-bit tagged pointer
- Computed
Layout - Resultado de
LayoutTree::compute: rect absoluto por nodo del árbol. - Dimension
- A unit of linear measurement
- Layout
- The final result of a layout algorithm for a single node.
- Layout
Tree - Árbol de layout. Encapsula la
TaffyTreey la lógica de absolutización. - Length
Percentage - A unit of linear measurement
- Length
Percentage Auto - A unit of linear measurement
- Line
- An abstract “line”. Represents any type that has a start and an end
- MaxTrack
Sizing Function - Maximum track sizing function
- MinTrack
Sizing Function - Minimum track sizing function
- NodeId
- A type representing the id of a single node in a tree of nodes
- Rect
- Caja absoluta de un nodo (origen en la esquina superior izquierda del viewport).
- Size
- The width and height of a
Rect - Style
- A typed representation of the CSS style information for a single node.
- Taffy
Tree - An entire tree of UI nodes. The entry point to Taffy’s high-level API.
Enums§
- Align
Content - Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- Align
Items - Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- Available
Space - The amount of space available to a node in a given axis https://www.w3.org/TR/css-sizing-3/#available
- BoxSizing
- Specifies whether size styles for this node are assigned to the node’s “content box” or “border box”
- Display
- Sets the layout used for the children of this node
- Flex
Direction - The direction of the flexbox layout main axis.
- Flex
Wrap - Controls whether flex items are forced onto one line or can wrap onto multiple lines.
- Grid
Auto Flow - Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
- Grid
Placement - A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
- Grid
Template Component - An element in a
grid-template-columnsorgrid-template-rowsdefinition. Either a track sizing function or a repeat(). - Layout
Error - Errores del motor de layout.
- Position
- The positioning strategy for this item.
- Repetition
Count - The first argument to a repeated track definition. This type represents the type of automatic repetition to perform.
Traits§
- FromFr
- Trait to create constant percent values from plain numbers
- From
Length - Trait to create absolute length values from plain numbers
- From
Percent - Trait to create constant percent values from plain numbers
- Layout
Partial Tree - Any type that implements
LayoutPartialTreecan be laid out using Taffy’s algorithms - Print
Tree - Trait used by the
print_treemethod which prints a debug representation - Round
Tree - Trait used by the
round_layoutmethod which takes a tree of unrounded float-valued layouts and performs rounding to snap the values to the pixel grid. - Taffy
Auto - Trait to abstract over auto values
- Taffy
FitContent - Trait to create
fit-content(…)values from plain numbers - Taffy
Grid Line - Trait to abstract over grid line values
- Taffy
Grid Span - Trait to abstract over grid span values
- Taffy
MaxContent - Trait to abstract over max_content values
- Taffy
MinContent - Trait to abstract over min_content values
- Taffy
Zero - Trait to abstract over zero values
- Traverse
Partial Tree - Taffy’s abstraction for downward tree traversal.
- Traverse
Tree - A marker trait which extends
TraversePartialTree
Functions§
- auto
- Returns the auto value for that type
- evenly_
sized_ tracks - Returns a grid template containing
countevenly sized tracks - fit_
content - Returns a value of the inferred type which represent a
fit-content(…)value with the given argument. - flex
- Shorthand for minmax(0, Nfr). Probably what you want if you want exactly evenly sized tracks.
- fr
- Create a
Fractiontrack sizing function (frin CSS) - length
- Returns a value of the inferred type which represent an absolute length
- line
- Specifies a grid line to place a grid item between in CSS Grid Line coordinates:
- max_
content - Returns the auto value for that type
- min_
content - Returns the auto value for that type
- minmax
- Returns a MinMax with min value of min and max value of max
- percent
- Returns a value of the inferred type which represent a percentage
- repeat
- Returns an auto-repeated track definition
- span
- Returns a GridPlacement::Span
- zero
- Returns the zero value for that type
Type Aliases§
- Align
Self - Controls alignment of an individual node
- Justify
Content - Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
- Justify
Items - Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container For Grid it controls alignment in the inline axis
- Justify
Self - Controls alignment of an individual node
- Track
Sizing Function - The sizing function for a grid track (row/column)