Expand description
Contains both a high-level interface to Taffy using a ready-made node tree, and a set of traits for defining custom node trees.
- For documentation on the high-level API, see the [
TaffyTree] struct. - For documentation on the low-level trait-based API, see the
traitsmodule.
Re-exports§
pub use traits::LayoutContainingBlock;pub use traits::LayoutPartialTree;pub use traits::PrintTree;pub use traits::RoundTree;pub use traits::TraversePartialTree;pub use traits::TraverseTree;pub use traits::LayoutGridContainer;
Modules§
- cache 🔒
- A cache for storing the results of layout computation
- layout 🔒
- Final data structures that represent the high-level UI layout
- node 🔒
- UI node types and related data structures.
- traits
- The abstractions that make up the core of Taffy’s low-level API
Structs§
- Axis
Static Align - The alignment to apply to an out-of-flow box’s margin box within its static-position area in a single axis.
- Axis
Static Position - The static position of an out-of-flow box in a single axis: the alignment container (start/end coordinates) plus the alignment to apply to the box’s margin box within it.
- Baselines
- The first and last baselines of a node in the horizontal axis (i.e. baselines for horizontal text, measured as an offset from the top edge of the node’s border box).
- Cache
- A cache for caching the results of a sizing a Grid Item or Flexbox Item
- Collapsible
Margin Set - A set of margins that are available for collapsing with for block layout’s margin collapsing
- Layout
- The final result of a layout algorithm for a single node.
- Layout
Input - A struct containing the inputs constraints/hints for laying out a node, which are passed in by the parent
- Layout
Output - A struct containing the result of laying a single node, which is returned up to the parent node
- NodeId
- A type representing the id of a single node in a tree of nodes
- OofCandidate
- A record of an out-of-flow (
position: absoluteorposition: fixed) box which has not yet been laid out because its containing block is an ancestor of its parent. - OofCandidates
- A list of
OofCandidates. - OofPositioning
Area - The area of a container against which the insets of its out-of-flow (absolute/fixed) boxes are resolved: the container’s border box minus its borders and scrollbar gutters.
Enums§
- Axis
Static Edge - The physical alignment of an out-of-flow box’s margin box within its static-position area (per-axis).
- Clear
State - Clear operation outcome. See
Cache::clear - Detailed
Layout Info - The additional information from layout algorithm
- Requested
Axis - An axis that layout algorithms can be requested to compute a size for
- RunMode
- Whether we are performing a full layout, or we merely need to size the node
- Sizing
Mode - Whether styles should be taken into account when computing size