Skip to content

API Reference

Tree

waxy.TaffyTree

TaffyTree()

A tree of layout nodes.

with_capacity staticmethod

with_capacity(capacity: int) -> TaffyTree[NodeContext]

Create a new layout tree with pre-allocated capacity.

new_leaf

new_leaf(style: Style) -> NodeId

Create a new leaf node with the given style.

new_leaf_with_context

new_leaf_with_context(
    style: Style, context: NodeContext
) -> NodeId

Create a new leaf node with the given style and context.

get_node_context

get_node_context(node: NodeId) -> NodeContext | None

Get the context attached to a node, if any.

set_node_context

set_node_context(
    node: NodeId, context: NodeContext | None
) -> None

Set or clear the context attached to a node.

new_with_children

new_with_children(
    style: Style, children: list[NodeId]
) -> NodeId

Create a new node with children.

add_child

add_child(parent: NodeId, child: NodeId) -> None

Add a child to a parent node.

insert_child_at_index

insert_child_at_index(
    parent: NodeId, child_index: int, child: NodeId
) -> None

Insert a child at a specific index.

set_children

set_children(
    parent: NodeId, children: list[NodeId]
) -> None

Set the children of a node, replacing any existing children.

remove_child

remove_child(parent: NodeId, child: NodeId) -> NodeId

Remove a specific child from a parent.

remove_child_at_index

remove_child_at_index(
    parent: NodeId, child_index: int
) -> NodeId

Remove a child at a specific index.

remove_children_range

remove_children_range(
    parent: NodeId, start: int, end: int
) -> None

Detach the children at indices start (inclusive) to end (exclusive) from a parent.

The children stay in the tree, without a parent. Raises ChildIndexOutOfBounds if the range is not within the parent's children.

replace_child_at_index

replace_child_at_index(
    parent: NodeId, child_index: int, new_child: NodeId
) -> NodeId

Replace the child at a specific index with a new child.

child_at_index

child_at_index(parent: NodeId, child_index: int) -> NodeId

Get the child at a specific index.

children

children(parent: NodeId) -> list[NodeId]

Get all children of a node.

child_count

child_count(parent: NodeId) -> int

Get the number of children of a node.

parent

parent(child: NodeId) -> NodeId | None

Get the parent of a node, if any.

total_node_count

total_node_count() -> int

Get the total number of nodes in the tree.

remove

remove(node: NodeId) -> NodeId

Remove a node from the tree.

clear

clear() -> None

Clear all nodes from the tree.

set_style

set_style(node: NodeId, style: Style) -> None

Set the style of a node.

Marks the node dirty only if the new style's values differ from the stored style's (which fields were explicitly set doesn't matter here), so setting an equal style keeps the node's cached layout. Call mark_dirty to force a relayout.

style

style(node: NodeId) -> Style

Get the style of a node.

taffy doesn't store which fields were explicitly set, so every field of the returned style is marked set. It compares equal to the style passed to set_style only if that style set every field.

mark_dirty

mark_dirty(node: NodeId) -> None

Mark a node as dirty (needing re-layout).

dirty

dirty(node: NodeId) -> bool

Check if a node is dirty (needs re-layout).

compute_layout

compute_layout(
    node: NodeId,
    available: AvailableSize | None = None,
    measure: Callable[
        [KnownSize, AvailableSize, NodeContext], Size
    ]
    | None = None,
) -> None

Compute the layout of a tree rooted at the given node.

measure is called for leaves with a context to size their content. It must return the same size for the same inputs within one call: repeated inputs for the same node are answered from the earlier result without calling measure again.

layout

layout(node: NodeId) -> Layout

Get the computed layout of a node.

unrounded_layout

unrounded_layout(node: NodeId) -> Layout

Get the unrounded layout of a node.

absolute_layouts

absolute_layouts(
    root: NodeId,
) -> list[tuple[NodeId, Point, Layout]]

Every visible node in the subtree under root, in pre-order, with its absolute position.

A node with display=Display.Nil is left out along with its whole subtree, since taffy gives those nodes no box, only a zero size at their parent's origin. If root or one of its ancestors is hidden, the list is empty. layout(node) still returns a hidden node's zero layout.

The position is relative to the top of the tree (the ancestor with no parent): the sum of the node's own and all its ancestors' locations. Each Layout is the same as layout(node) returns, so its location stays relative to the node's parent.

Like layout, this follows the tree's rounding setting. With rounding enabled, the position is the sum of the unrounded locations, rounded once, which is where taffy's rounded size assumes the node starts. In taffy 0.14, summing the rounded locations instead can be off by a pixel, since it rounds each location relative to its parent (taffy#834).

detailed_layout_info

detailed_layout_info(
    node: NodeId,
) -> DetailedGridInfo | None

Get detailed grid layout information for a node.

Returns None if the node is not a grid container or has not been laid out.

enable_rounding

enable_rounding() -> None

Enable rounding of layout values.

disable_rounding

disable_rounding() -> None

Disable rounding of layout values.

print_tree

print_tree(root: NodeId) -> None

Print the layout tree to stdout for debugging.

format_tree

format_tree(root: NodeId) -> str

An indented dump of the subtree rooted at root, one line per node, for debugging.

Each line gives the node's id, its computed location and size, and the style fields that differ from taffy's defaults. Unlike print_tree, it returns the string rather than writing to stdout.

Style

waxy.Style

Style(
    *,
    display: Display | None = None,
    box_sizing: BoxSizing | None = None,
    overflow_x: Overflow | None = None,
    overflow_y: Overflow | None = None,
    scrollbar_width: float | None = None,
    position: Position | None = None,
    direction: Direction | None = None,
    contain: Contain | None = None,
    float: Float | None = None,
    clear: Clear | None = None,
    item_is_table: bool | None = None,
    item_is_replaced: bool | None = None,
    inset_left: LengthPercentageAutoValue | None = None,
    inset_right: LengthPercentageAutoValue | None = None,
    inset_top: LengthPercentageAutoValue | None = None,
    inset_bottom: LengthPercentageAutoValue | None = None,
    size_width: DimensionValue | None = None,
    size_height: DimensionValue | None = None,
    min_size_width: LengthPercentageAutoValue | None = None,
    min_size_height: LengthPercentageAutoValue
    | None = None,
    max_size_width: LengthPercentageAutoValue | None = None,
    max_size_height: LengthPercentageAutoValue
    | None = None,
    aspect_ratio: float | None = None,
    margin_left: LengthPercentageAutoValue | None = None,
    margin_right: LengthPercentageAutoValue | None = None,
    margin_top: LengthPercentageAutoValue | None = None,
    margin_bottom: LengthPercentageAutoValue | None = None,
    padding_left: LengthPercentageValue | None = None,
    padding_right: LengthPercentageValue | None = None,
    padding_top: LengthPercentageValue | None = None,
    padding_bottom: LengthPercentageValue | None = None,
    border_left: LengthPercentageValue | None = None,
    border_right: LengthPercentageValue | None = None,
    border_top: LengthPercentageValue | None = None,
    border_bottom: LengthPercentageValue | None = None,
    align_items: AlignItems | None = None,
    align_self: AlignItems | None = None,
    justify_items: AlignItems | None = None,
    justify_self: AlignItems | None = None,
    align_content: AlignContent | None = None,
    justify_content: AlignContent | None = None,
    gap_width: LengthPercentageValue | None = None,
    gap_height: LengthPercentageValue | None = None,
    text_align: TextAlign | None = None,
    flex_direction: FlexDirection | None = None,
    flex_wrap: FlexWrap | None = None,
    flex_basis: FlexBasisValue | None = None,
    flex_grow: float | None = None,
    flex_shrink: float | None = None,
    flex_line_count: int | None = None,
    grid_template_rows: list[GridTemplateValue]
    | None = None,
    grid_template_columns: list[GridTemplateValue]
    | None = None,
    grid_template_row_names: list[list[str]] | None = None,
    grid_template_column_names: list[list[str]]
    | None = None,
    grid_template_areas: GridTemplateAreas | None = None,
    grid_auto_rows: list[GridTrackValue] | None = None,
    grid_auto_columns: list[GridTrackValue] | None = None,
    grid_auto_flow: GridAutoFlow | None = None,
    grid_row: GridPlacement | None = None,
    grid_column: GridPlacement | None = None,
)

Style properties for a layout node.

All fields are keyword-only. Passing None (or omitting) uses the taffy default. Style is immutable — construct a new instance to change fields, or use | to merge.

A style remembers which fields were explicitly set (see fields_set), and a | b takes each field set in b from b and every other field from a. Two styles are equal only if they hold the same values and set the same fields, since otherwise they would merge differently: Style() != Style(display=Display.Flex), though Flex is the default.

See: taffy Style

All arguments are keyword-only. Omitting or passing None for a field uses the taffy default value for that field, except align_*/justify_* and grid_template_areas, where None explicitly clears the field. See each property for documentation of individual fields.

Raises TypeError for an unknown keyword or a value of the wrong type, and InvalidFlexLineCount if flex_line_count is 0.

Parameters:

Name Type Description Default
display Display | None

How the node is laid out (Block, FlowRoot, Flex, Grid, or Nil). MDN

None
box_sizing BoxSizing | None

Whether size includes border and padding (BorderBox) or not (ContentBox). MDN

None
overflow_x Overflow | None

How overflowing content is handled horizontally. MDN

None
overflow_y Overflow | None

How overflowing content is handled vertically. MDN

None
scrollbar_width float | None

Width of the scrollbar gutter in pixels. MDN

None
position Position | None

Whether the node is positioned relative to its parent or absolutely. MDN

None
direction Direction | None

Inline direction of the node's content (Ltr or Rtl). MDN

None
contain Contain | None

Layout and/or paint containment. MDN

None
float Float | None

Which side the node floats to within a block container. MDN

None
clear Clear | None

Which preceding floats the node is moved below. MDN

None
item_is_table bool | None

Whether the node is a table, which block layout sizes differently.

None
item_is_replaced bool | None

Whether the node is a replaced element (like an image). MDN

None
inset_left LengthPercentageAutoValue | None

Left offset for absolutely-positioned nodes. MDN

None
inset_right LengthPercentageAutoValue | None

Right offset for absolutely-positioned nodes. MDN

None
inset_top LengthPercentageAutoValue | None

Top offset for absolutely-positioned nodes. MDN

None
inset_bottom LengthPercentageAutoValue | None

Bottom offset for absolutely-positioned nodes. MDN

None
size_width DimensionValue | None

Preferred width of the node. MDN

None
size_height DimensionValue | None

Preferred height of the node. MDN

None
min_size_width LengthPercentageAutoValue | None

Minimum width of the node. MDN

None
min_size_height LengthPercentageAutoValue | None

Minimum height of the node. MDN

None
max_size_width LengthPercentageAutoValue | None

Maximum width of the node. MDN

None
max_size_height LengthPercentageAutoValue | None

Maximum height of the node. MDN

None
aspect_ratio float | None

Preferred aspect ratio (width / height), or None. MDN

None
margin_left LengthPercentageAutoValue | None

Left outer spacing. MDN

None
margin_right LengthPercentageAutoValue | None

Right outer spacing. MDN

None
margin_top LengthPercentageAutoValue | None

Top outer spacing. MDN

None
margin_bottom LengthPercentageAutoValue | None

Bottom outer spacing. MDN

None
padding_left LengthPercentageValue | None

Left inner spacing. MDN

None
padding_right LengthPercentageValue | None

Right inner spacing. MDN

None
padding_top LengthPercentageValue | None

Top inner spacing. MDN

None
padding_bottom LengthPercentageValue | None

Bottom inner spacing. MDN

None
border_left LengthPercentageValue | None

Left border width. MDN

None
border_right LengthPercentageValue | None

Right border width. MDN

None
border_top LengthPercentageValue | None

Top border width. MDN

None
border_bottom LengthPercentageValue | None

Bottom border width. MDN

None
align_items AlignItems | None

Default alignment of children along the cross axis. MDN

None
align_self AlignItems | None

Override alignment of this node along the parent's cross axis. MDN

None
justify_items AlignItems | None

Default alignment of children along the main axis. MDN

None
justify_self AlignItems | None

Override alignment of this node along the parent's main axis. MDN

None
align_content AlignContent | None

Alignment of rows/columns when there is extra space in the cross axis. MDN

None
justify_content AlignContent | None

Distribution of children along the main axis. MDN

None
gap_width LengthPercentageValue | None

Horizontal gap between grid/flex items. MDN

None
gap_height LengthPercentageValue | None

Vertical gap between grid/flex items. MDN

None
text_align TextAlign | None

Text alignment within the node. MDN

None
flex_direction FlexDirection | None

Direction of the flex container's main axis. MDN

None
flex_wrap FlexWrap | None

Whether flex items wrap onto multiple lines. MDN

None
flex_basis FlexBasisValue | None

Default size of a flex item before growing or shrinking. MDN

None
flex_grow float | None

Rate at which a flex item grows to fill available space. MDN

None
flex_shrink float | None

Rate at which a flex item shrinks when space is tight. MDN

None
flex_line_count int | None

Minimum number of lines in a multi-line flex container (at least 1). CSS

None
grid_template_rows list[GridTemplateValue] | None

Explicit row track sizing in a grid container. MDN

None
grid_template_columns list[GridTemplateValue] | None

Explicit column track sizing in a grid container. MDN

None
grid_template_row_names list[list[str]] | None

Names of the lines between rows. MDN

None
grid_template_column_names list[list[str]] | None

Names of the lines between columns. MDN

None
grid_template_areas GridTemplateAreas | None

Named areas of the grid template. MDN

None
grid_auto_rows list[GridTrackValue] | None

Sizing of implicitly-created row tracks. MDN

None
grid_auto_columns list[GridTrackValue] | None

Sizing of implicitly-created column tracks. MDN

None
grid_auto_flow GridAutoFlow | None

How auto-placed items are inserted in the grid. MDN

None
grid_row GridPlacement | None

Row placement of this item in a grid container. MDN

None
grid_column GridPlacement | None

Column placement of this item in a grid container. MDN

None

fields_set property

fields_set: frozenset[str]

The names of the explicitly set fields.

display property

display: Display

How the node is laid out (Block, FlowRoot, Flex, Grid, or Nil). MDN.

box_sizing property

box_sizing: BoxSizing

Whether size includes border and padding (BorderBox) or not (ContentBox). MDN.

overflow_x property

overflow_x: Overflow

How overflowing content is handled horizontally. MDN.

overflow_y property

overflow_y: Overflow

How overflowing content is handled vertically. MDN.

scrollbar_width property

scrollbar_width: float

Width of the scrollbar gutter in pixels. MDN.

position property

position: Position

Whether the node is positioned relative to its parent or absolutely. MDN.

direction property

direction: Direction

Inline direction of the node's content (Ltr or Rtl). MDN.

contain property

contain: Contain

Layout and/or paint containment. MDN.

float property

float: Float

Which side the node floats to within a block container. MDN.

clear property

clear: Clear

Which preceding floats the node is moved below. MDN.

item_is_table property

item_is_table: bool

Whether the node is a table, which block layout sizes differently.

item_is_replaced property

item_is_replaced: bool

Whether the node is a replaced element (like an image). MDN.

inset_left property

Left offset for absolutely-positioned nodes. MDN.

inset_right property

Right offset for absolutely-positioned nodes. MDN.

inset_top property

Top offset for absolutely-positioned nodes. MDN.

inset_bottom property

Bottom offset for absolutely-positioned nodes. MDN.

size_width property

size_width: DimensionValue

Preferred width of the node. MDN.

size_height property

size_height: DimensionValue

Preferred height of the node. MDN.

min_size_width property

min_size_width: LengthPercentageAutoValue

Minimum width of the node. MDN.

min_size_height property

min_size_height: LengthPercentageAutoValue

Minimum height of the node. MDN.

max_size_width property

max_size_width: LengthPercentageAutoValue

Maximum width of the node. MDN.

max_size_height property

max_size_height: LengthPercentageAutoValue

Maximum height of the node. MDN.

aspect_ratio property

aspect_ratio: float | None

Preferred aspect ratio (width / height), or None. MDN.

margin_left property

Left outer spacing. MDN.

margin_right property

Right outer spacing. MDN.

margin_top property

Top outer spacing. MDN.

margin_bottom property

Bottom outer spacing. MDN.

padding_left property

padding_left: LengthPercentageValue

Left inner spacing. MDN.

padding_right property

padding_right: LengthPercentageValue

Right inner spacing. MDN.

padding_top property

padding_top: LengthPercentageValue

Top inner spacing. MDN.

padding_bottom property

padding_bottom: LengthPercentageValue

Bottom inner spacing. MDN.

border_left property

border_left: LengthPercentageValue

Left border width. MDN.

border_right property

border_right: LengthPercentageValue

Right border width. MDN.

border_top property

Top border width. MDN.

border_bottom property

border_bottom: LengthPercentageValue

Bottom border width. MDN.

align_items property

align_items: AlignItems | None

Default alignment of children along the cross axis. MDN.

align_self property

align_self: AlignItems | None

Override alignment of this node along the parent's cross axis. MDN.

justify_items property

justify_items: AlignItems | None

Default alignment of children along the main axis. MDN.

justify_self property

justify_self: AlignItems | None

Override alignment of this node along the parent's main axis. MDN.

align_content property

align_content: AlignContent | None

Alignment of rows/columns when there is extra space in the cross axis. MDN.

justify_content property

justify_content: AlignContent | None

Distribution of children along the main axis. MDN.

gap_width property

Horizontal gap between grid/flex items. MDN.

gap_height property

Vertical gap between grid/flex items. MDN.

text_align property

text_align: TextAlign

Text alignment within the node. MDN.

flex_direction property

flex_direction: FlexDirection

Direction of the flex container's main axis. MDN.

flex_wrap property

flex_wrap: FlexWrap

Whether flex items wrap onto multiple lines. MDN.

flex_basis property

flex_basis: FlexBasisValue

Default size of a flex item before growing or shrinking. MDN.

flex_grow property

flex_grow: float

Rate at which a flex item grows to fill available space. MDN.

flex_shrink property

flex_shrink: float

Rate at which a flex item shrinks when space is tight. MDN.

flex_line_count property

flex_line_count: int

Minimum number of lines in a multi-line flex container (at least 1). CSS.

grid_template_rows property

grid_template_rows: list[GridTemplateValue]

Explicit row track sizing in a grid container. MDN.

grid_template_columns property

grid_template_columns: list[GridTemplateValue]

Explicit column track sizing in a grid container. MDN.

grid_template_row_names property

grid_template_row_names: list[list[str]]

Names of the lines between rows, positional with grid_template_rows.

Entry i names the line before grid_template_rows[i] (a Repeat counts as one entry), and one final entry names the line after the last row. MDN.

grid_template_column_names property

grid_template_column_names: list[list[str]]

Names of the lines between columns, positional with grid_template_columns.

Entry i names the line before grid_template_columns[i] (a Repeat counts as one entry), and one final entry names the line after the last column. MDN.

grid_template_areas property

grid_template_areas: GridTemplateAreas | None

Named areas of the grid template. MDN.

grid_auto_rows property

grid_auto_rows: list[GridTrackValue]

Sizing of implicitly-created row tracks. MDN.

grid_auto_columns property

grid_auto_columns: list[GridTrackValue]

Sizing of implicitly-created column tracks. MDN.

grid_auto_flow property

grid_auto_flow: GridAutoFlow

How auto-placed items are inserted in the grid. MDN.

grid_row property

grid_row: GridPlacement

Row placement of this item in a grid container. MDN.

grid_column property

grid_column: GridPlacement

Column placement of this item in a grid container. MDN.

Layout

waxy.Layout

The computed layout of a node.

The layout uses a border box coordinate system:

  • location is the position of this node's border box origin, relative to the parent's border box origin (not the parent's content box, and not absolute/viewport coordinates). This means a child inside a parent with padding or border will have its location offset by the parent's padding + border widths. A child's own margin also offsets its location outward from siblings.
  • size is the border box size: it includes border + padding + content, but excludes margin.
  • To compute absolute positions, accumulate location values from the root down to the node.
  • To compute the content box, subtract border and padding from size (or use content_box_width() / content_box_height()).
  • To compute the margin box, expand outward from (location, size) by the margin widths.

Note: box_sizing does not affect the Layout output. It only controls how the style's size_width/size_height inputs are interpreted (as border box or content box dimensions). The computed Layout.size is always the border box. For example, with padding_left=10, padding_right=10 and size_width=100:

  • BorderBox (default): style size is the border box → layout.size.width = 100, content_box_width() = 80
  • ContentBox: style size is the content box → layout.size.width = 120, content_box_width() = 100

order property

order: int

Topological paint order computed by taffy. Higher values are painted on top.

location property

location: Point

Position of this node's border box origin, relative to the parent's border box origin.

size property

size: Size

Border box dimensions (includes border + padding + content, excludes margin).

scrollable_overflow_rect property

scrollable_overflow_rect: Rect

The extent of the node's scrollable overflow, relative to its padding box origin.

left/top are <= 0 (overflow before the scroll origin, which scrolling can't reach) and right/bottom are >= 0 (the reachable extent of the content).

scrollbar_size property

scrollbar_size: Size

Size reserved for scrollbars.

border property

border: Rect

Resolved border widths on each side.

padding property

padding: Rect

Resolved padding widths on each side.

margin property

margin: Rect

Resolved margin widths on each side.

content_box_width

content_box_width() -> float

Width of the content box (size minus padding and border).

content_box_height

content_box_height() -> float

Height of the content box (size minus padding and border).

content_box_size

content_box_size() -> Size

Size of the content box (size minus padding and border).

content_box_x

content_box_x() -> float

X offset of the content box, relative to the parent's border box origin.

content_box_y

content_box_y() -> float

Y offset of the content box, relative to the parent's border box origin.

scroll_width

scroll_width() -> float

The maximum horizontal scroll offset of the node (0 if its content doesn't overflow).

scroll_height

scroll_height() -> float

The maximum vertical scroll offset of the node (0 if its content doesn't overflow).

waxy.DetailedGridInfo

Detailed results of laying out a grid container: its tracks and item placements.

Returned by TaffyTree.detailed_layout_info for grid containers.

rows property

The row tracks.

columns property

The column tracks.

items property

The placement of each in-flow grid item.

Absolutely positioned and display: Nil children are not grid items.

grid_template_rows

grid_template_rows() -> str

The used row sizes and line names, as a CSS grid-template-rows resolved value.

For example, "[header-start] 20px [header-end] 30px".

grid_template_columns

grid_template_columns() -> str

The used column sizes and line names, as a CSS grid-template-columns resolved value.

item_grid_area

item_grid_area(item_index: int) -> tuple[Point, Size]

The location and size of the grid area occupied by the item at item_index.

item_index indexes items. The location is relative to the container's border box, and the area excludes surrounding gaps. Raises IndexError if item_index is out of range.

resolve_absolute_grid_area

resolve_absolute_grid_area(
    grid_row: GridPlacement,
    grid_column: GridPlacement,
    direction: Direction,
    padding_box: Rect,
) -> Rect

Resolve the grid area for an absolutely positioned box from its grid placement.

padding_box and the returned area are relative to the grid container's border box.

waxy.DetailedGridTracksInfo

The computed tracks of one axis (rows or columns) of a grid container.

Tracks are indexed over the full grid: leading implicit tracks, then explicit tracks, then trailing implicit tracks. Line i bounds the start of track i.

negative_implicit_tracks property

negative_implicit_tracks: int

Number of implicit tracks before the explicit grid.

explicit_tracks property

explicit_tracks: int

Number of explicit tracks.

positive_implicit_tracks property

positive_implicit_tracks: int

Number of implicit tracks after the explicit grid.

positions property

positions: list[Line]

The start and end position of each track, relative to the container's border box.

Positions account for the container's border and padding, gaps, content alignment, and collapsed tracks.

line_names property

line_names: list[list[str]]

The names of each grid line (one more line than there are tracks).

names_for_line

names_for_line(line_index: int) -> list[str]

The names of the 0-indexed grid line line_index (empty if unnamed or out of range).

waxy.DetailedGridItemInfo

The placement of one grid item, as 1-based grid line numbers.

row_start property

row_start: int

The 1-based grid line the item starts at in the row axis.

row_end property

row_end: int

The 1-based grid line the item ends at in the row axis.

column_start property

column_start: int

The 1-based grid line the item starts at in the column axis.

column_end property

column_end: int

The 1-based grid line the item ends at in the column axis.

Node

waxy.NodeId

A handle to a node in the layout tree.

Geometry

waxy.Size

Size(width: float = 0.0, height: float = 0.0)

A 2D size with width and height.

width property

width: float

The width.

height property

height: float

The height.

area property

area: float

The area (width * height).

waxy.Rect

Rect(
    left: float = 0.0,
    right: float = 0.0,
    top: float = 0.0,
    bottom: float = 0.0,
)

A value for each of the four sides of a box (left, right, top, bottom).

Mirrors taffy's Rect<f32>: per-side values such as Layout.margin, Layout.padding and Layout.border, or the edges of a box such as Layout.scrollable_overflow_rect.

left property

left: float

The value for the left side.

right property

right: float

The value for the right side.

top property

top: float

The value for the top side.

bottom property

bottom: float

The value for the bottom side.

waxy.Point

Point(x: float = 0.0, y: float = 0.0)

A 2D point with x and y coordinates.

x property

x: float

The horizontal coordinate.

y property

y: float

The vertical coordinate.

waxy.Line

Line(start: float = 0.0, end: float = 0.0)

A start and an end value.

Mirrors taffy's Line<f32>, e.g. the start and end positions of a grid track in DetailedGridTracksInfo.positions.

start property

start: float

The start value.

end property

end: float

The end value.

waxy.KnownSize

KnownSize(
    width: float | None = None, height: float | None = None
)

Known dimensions passed to measure functions (independently-optional width/height).

Passed to the measure callback to indicate which dimensions are already known from the node's style. If a dimension is None, the measure function must compute it.

See: taffy Size<Option<f32>>

width property

width: float | None

The known width, or None if the measure function must compute it.

height property

height: float | None

The known height, or None if the measure function must compute it.

waxy.AvailableSize

AvailableSize(
    width: AvailableSpaceValue, height: AvailableSpaceValue
)

Available space for measure functions (width/height: Definite | MinContent | MaxContent).

Passed to the measure callback to indicate how much space is available for layout. Each dimension is one of the available-space variants.

See: taffy Size<AvailableSpace>

width property

The space available in the horizontal axis.

height property

The space available in the vertical axis.

Value types

waxy.Length

Length(value: float)

A length value in pixels.

Used for size, padding, border, gap, margin, inset, and grid track sizing fields.

Raises InvalidLength if value is NaN.

See: taffy Dimension::Length, MDN <length>

value property

value: float

The length in pixels.

waxy.Percent

Percent(value: float)

A percentage value (0.0 to 1.0).

Used for size, padding, border, gap, margin, inset, and grid track sizing fields. Raises InvalidPercent (a subclass of both WaxyException and ValueError) if value is outside the range [0.0, 1.0].

See: taffy Dimension::Percent, MDN <percentage>

value property

value: float

The fraction of the reference size, from 0.0 to 1.0.

waxy.Auto

Auto()

Automatic sizing or placement.

Used for size, margin, inset, flex-basis, and grid placement fields.

See: taffy Dimension::Auto

waxy.MinContent

MinContent()

CSS min-content intrinsic sizing.

The smallest size that can fit the item's contents with all soft line-wrapping opportunities taken. Used in size_*, flex_basis, available space (measure functions), and grid track sizing.

See: taffy MinTrackSizingFunction::MinContent, MDN min-content

waxy.MaxContent

MaxContent()

CSS max-content intrinsic sizing.

The smallest size that can fit the item's contents with no soft line-wrapping opportunities taken. Used in size_*, flex_basis, available space (measure functions), and grid track sizing.

See: taffy MinTrackSizingFunction::MaxContent, MDN max-content

waxy.Stretch

Stretch()

CSS stretch sizing keyword.

Fills the containing block's available space, less the node's margins. Used only in size_* and flex_basis.

See: taffy Dimension::stretch, MDN stretch

waxy.FitContentKeyword

FitContentKeyword()

CSS fit-content sizing keyword (without a limit).

Equivalent to fit-content(stretch): the node is sized to its contents, clamped between its min-content size and the available space. For an explicit limit, use FitContent. Used only in size_* and flex_basis.

See: taffy Dimension::fit_content, MDN fit-content

waxy.Content

Content()

CSS content flex basis keyword.

Sizes the flex item based on its content, ignoring its size_* in the main axis. Used only in flex_basis.

See: taffy Dimension::content, MDN flex-basis: content

waxy.Definite

Definite(value: float)

A definite available space in pixels.

Used only in AvailableSize (measure function input) to represent a concrete pixel measurement of available space.

See: taffy AvailableSpace::Definite

value property

value: float

The available space in pixels.

waxy.Fraction

Fraction(value: float)

A fractional unit of remaining grid space (CSS fr unit).

After fixed lengths and percentages are allocated, remaining space is divided among fractional tracks proportionally. For example, Fraction(1) and Fraction(2) in the same grid get 1/3 and 2/3 of remaining space.

Used only in grid track sizing (grid_template_, grid_auto_).

See: taffy MaxTrackSizingFunction::Fraction, MDN <flex> (fr unit)

value property

value: float

The number of fractional units (the fr value).

waxy.FitContent

FitContent(limit: Length | Percent)

CSS fit-content() sizing function.

Grows up to a specified limit, then clamps: max(min_content, min(max_content, limit)). The limit must be a Length or Percent. For the bare fit-content keyword, use FIT_CONTENT.

Used in size_*, flex_basis, and grid track sizing.

See: taffy MaxTrackSizingFunction::FitContent, MDN fit-content()

limit property

limit: Length | Percent

The size the node grows to before clamping.

waxy.Minmax

CSS minmax() grid track sizing function.

Defines a size range: min sets the minimum track size, max sets the maximum.

  • min: Length | Percent | Auto | MinContent | MaxContent
  • max: Length | Percent | Auto | MinContent | MaxContent | Fraction | FitContent

Used only in grid track sizing.

See: taffy TrackSizingFunction, MDN minmax()

min property

The minimum track size.

max property

The maximum track size.

waxy.Repeat

Repeat(
    count: int | AutoFill | AutoFit,
    tracks: list[GridTrackValue],
    line_names: list[list[str]] | None = None,
)

CSS repeat() in grid_template_rows / grid_template_columns.

Repeats tracks count times, where count is a positive int, AUTO_FILL, or AUTO_FIT. line_names, if given, names the lines of each repetition positionally: entry i names the line before tracks[i], and the final entry names the line after the last track, so it has len(tracks) + 1 entries.

Raises InvalidRepeat if count is 0, tracks is empty, or line_names is neither empty nor len(tracks) + 1 long.

See: taffy GridTemplateRepetition, MDN repeat()

count property

count: int | AutoFill | AutoFit

How many times tracks repeats.

tracks property

The tracks of one repetition.

line_names property

line_names: list[list[str]]

The names of each line of one repetition (empty if unnamed).

waxy.AutoFill

AutoFill()

CSS auto-fill repetition count.

Repeat as many times as fit in the container without overflowing, keeping empty tracks. Used only as the count of a Repeat.

See: taffy RepetitionCount::AutoFill, MDN auto-fill

waxy.AutoFit

AutoFit()

CSS auto-fit repetition count.

Like AutoFill, but empty repeated tracks collapse to zero size. Used only as the count of a Repeat.

See: taffy RepetitionCount::AutoFit, MDN auto-fit

waxy.GridLine

GridLine(index: int)

A 1-based grid line index (negative indices count from the end).

Used in GridPlacement.start and GridPlacement.end.

Raises InvalidGridLine if index is 0 (grid lines are 1-based; negative indices count from the end).

See: taffy GridPlacement::Line, MDN Line-based placement

index property

index: int

The 1-based line index (negative counts from the end).

waxy.GridSpan

GridSpan(count: int)

Span a number of grid tracks.

Used in GridPlacement.start and GridPlacement.end.

Raises InvalidGridSpan if count is 0 (must span at least 1 track).

See: taffy GridPlacement::Span, MDN grid-column-start (span)

count property

count: int

The number of tracks spanned.

waxy.NamedGridLine

NamedGridLine(name: str, index: int = 1)

Place at the indexth grid line with the given name (counting from the end if negative).

If no line has that name, the implicit name-start/name-end lines of a named grid area are tried before falling back to the implicit grid, so NamedGridLine("header") in both start and end places an item in the header area.

Used in GridPlacement.start and GridPlacement.end.

Raises InvalidGridLine if index is 0.

See: taffy GridPlacement::NamedLine, MDN grid-row-start

name property

name: str

The line name.

index property

index: int

Which line with that name, 1-based (negative counts from the end).

waxy.NamedGridSpan

NamedGridSpan(name: str, count: int = 1)

Span until the countth grid line with the given name.

Used in GridPlacement.start and GridPlacement.end.

Raises InvalidGridSpan if count is 0.

See: taffy GridPlacement::NamedSpan, MDN grid-row-start (span)

name property

name: str

The line name.

count property

count: int

How many lines with that name the item spans across.

waxy.GridPlacement

GridPlacement(
    start: GridPlacementValue | None = None,
    end: GridPlacementValue | None = None,
)

A start/end pair of grid placements for a child item.

Each of start and end is a GridPlacementValue (GridLine | GridSpan | NamedGridLine | NamedGridSpan | Auto). Defaults both to Auto (the CSS default for unplaced items).

See: taffy Line<GridPlacement>, MDN grid-row, MDN grid-column

start property

The start placement.

end property

The end placement.

waxy.GridTemplateArea

GridTemplateArea(
    name: str,
    row_start: int,
    row_end: int,
    column_start: int,
    column_end: int,
)

A named rectangular area of a grid template, bounded by 1-based grid lines.

An area covering only the first row and first two columns is GridTemplateArea("header", 1, 2, 1, 3).

Raises InvalidGridTemplateArea if a start line is 0 or an end line is not after its start line.

See: taffy GridTemplateArea, MDN grid-template-areas

name property

name: str

The area name.

row_start property

row_start: int

The 1-based grid line the area starts at in the row axis.

row_end property

row_end: int

The 1-based grid line the area ends at in the row axis.

column_start property

column_start: int

The 1-based grid line the area starts at in the column axis.

column_end property

column_end: int

The 1-based grid line the area ends at in the column axis.

waxy.GridTemplateAreas

GridTemplateAreas(
    areas: list[GridTemplateArea],
    row_count: int,
    column_count: int,
)

A grid template's named areas, plus its size in tracks (CSS grid-template-areas).

The template can be larger than the extent of its named areas because of unnamed cells, so row_count and column_count are stored explicitly. Most templates are easiest to build from CSS strings with GridTemplateAreas.from_strings.

Each area also defines implicit named lines name-start and name-end, so items can be placed into an area with NamedGridLine(name).

Raises InvalidGridTemplateAreas if an area extends past row_count/column_count, or if two areas share a name.

See: taffy GridTemplateAreas, MDN grid-template-areas

areas property

The named areas.

row_count property

row_count: int

The number of rows in the template.

column_count property

column_count: int

The number of columns in the template.

from_strings staticmethod

from_strings(rows: list[str]) -> GridTemplateAreas

Parse CSS grid-template-areas row strings.

Each string is one row of whitespace-separated cell names, and . marks an unnamed cell. For example, GridTemplateAreas.from_strings(["header header", "nav main"]).

Raises InvalidGridTemplateAreas if the rows have different numbers of cells, an area is not a rectangle, or a row contains a character that is not part of a name.

Constants

waxy.AUTO module-attribute

AUTO: Auto = Auto()

Automatic sizing or placement.

Used for size_*, min_size_*, max_size_*, flex_basis, margin_*, inset_*, and grid track and placement contexts.

See: taffy Dimension::Auto

waxy.MIN_CONTENT module-attribute

MIN_CONTENT: MinContent = MinContent()

CSS min-content intrinsic sizing.

The smallest size that can fit the item's contents with all soft line-wrapping opportunities taken.

Used in available space (measure functions) and grid track sizing.

See: taffy MinTrackSizingFunction::MinContent, MDN min-content

waxy.MAX_CONTENT module-attribute

MAX_CONTENT: MaxContent = MaxContent()

CSS max-content intrinsic sizing.

The smallest size that can fit the item's contents with no soft line-wrapping opportunities taken.

Used in available space (measure functions) and grid track sizing.

See: taffy MinTrackSizingFunction::MaxContent, MDN max-content

waxy.STRETCH module-attribute

STRETCH: Stretch = Stretch()

CSS stretch sizing keyword.

Fills the containing block's available space, less the node's margins.

Used only in size_* and flex_basis.

See: taffy Dimension::stretch, MDN stretch

waxy.FIT_CONTENT module-attribute

FIT_CONTENT: FitContentKeyword = FitContentKeyword()

CSS fit-content sizing keyword (without a limit).

Equivalent to fit-content(stretch): the node is sized to its contents, clamped between its min-content and the available space. For an explicit limit, use [FitContent].

Used only in size_* and flex_basis.

See: taffy Dimension::fit_content, MDN fit-content

waxy.CONTENT module-attribute

CONTENT: Content = Content()

CSS content flex basis keyword.

Sizes the flex item based on its content, ignoring its size_* in the main axis.

Used only in flex_basis.

See: taffy Dimension::content, MDN flex-basis: content

waxy.AUTO_FILL module-attribute

AUTO_FILL: AutoFill = AutoFill()

CSS auto-fill repetition count: repeat as many times as fit without overflowing, keeping empty tracks.

Used only as the count of a Repeat.

See: taffy RepetitionCount::AutoFill, MDN auto-fill

waxy.AUTO_FIT module-attribute

AUTO_FIT: AutoFit = AutoFit()

CSS auto-fit repetition count: like auto-fill, but empty repeated tracks collapse.

Used only as the count of a Repeat.

See: taffy RepetitionCount::AutoFit, MDN auto-fit

Type aliases

waxy.DimensionValue

A dimension value used for size_*.

waxy.FlexBasisValue

FlexBasisValue = DimensionValue | Content

A flex basis value: any DimensionValue, or Content.

waxy.LengthPercentageAutoValue

LengthPercentageAutoValue = Length | Percent | Auto

A length, percentage, or auto value used for margin, inset, and min_size_*/max_size_*.

waxy.LengthPercentageValue

LengthPercentageValue = Length | Percent

A length-or-percentage value used for padding, border, and gap: Length or Percent.

waxy.GridTrackValue

GridTrackValue = (
    Length
    | Percent
    | Auto
    | MinContent
    | MaxContent
    | Fraction
    | Minmax
    | FitContent
)

A grid track sizing value used in grid_template_ and grid_auto_ fields.

waxy.GridTemplateValue

GridTemplateValue = GridTrackValue | Repeat

An entry of grid_template_rows / grid_template_columns: a track or a Repeat.

waxy.GridTrackMinValue

GridTrackMinValue = (
    Length | Percent | Auto | MinContent | MaxContent
)

Minimum sizing bound for a Minmax grid track.

waxy.GridTrackMaxValue

GridTrackMaxValue = (
    Length
    | Percent
    | Auto
    | MinContent
    | MaxContent
    | Fraction
    | FitContent
)

Maximum sizing bound for a Minmax grid track.

waxy.GridPlacementValue

GridPlacementValue = (
    GridLine
    | GridSpan
    | NamedGridLine
    | NamedGridSpan
    | Auto
)

A grid placement value used in GridPlacement start and end.

waxy.AvailableSpaceValue

AvailableSpaceValue = Definite | MinContent | MaxContent

Available space value for measure functions: Definite, MinContent, or MaxContent.

Enums

waxy.Display

How the node should be displayed.

Block instance-attribute

Block: Display

Block layout.

Flex instance-attribute

Flex: Display

Flexbox layout.

Grid instance-attribute

Grid: Display

CSS Grid layout.

Nil instance-attribute

Nil: Display

No display (maps to CSS display: none).

FlowRoot instance-attribute

FlowRoot: Display

Block layout that always establishes an independent formatting context.

waxy.Position

How the node should be positioned.

Relative instance-attribute

Relative: Position

Positioned according to normal flow, then offset.

Absolute instance-attribute

Absolute: Position

Removed from normal flow and positioned relative to its containing block.

waxy.FlexDirection

The direction of a flex container's main axis.

Row instance-attribute

Items are laid out in a row (left to right).

Column instance-attribute

Column: FlexDirection

Items are laid out in a column (top to bottom).

RowReverse instance-attribute

RowReverse: FlexDirection

Items are laid out in a row in reverse order (right to left).

ColumnReverse instance-attribute

ColumnReverse: FlexDirection

Items are laid out in a column in reverse order (bottom to top).

waxy.FlexWrap

Whether flex items wrap.

NoWrap instance-attribute

NoWrap: FlexWrap

Items are forced onto a single line.

Wrap instance-attribute

Wrap: FlexWrap

Items wrap onto multiple lines.

WrapReverse instance-attribute

WrapReverse: FlexWrap

Items wrap onto multiple lines in reverse order.

Balance instance-attribute

Balance: FlexWrap

Items wrap onto lines of balanced length (CSS flex-wrap: balance).

Lines are balanced into at least flex_line_count lines.

BalanceReverse instance-attribute

BalanceReverse: FlexWrap

Like Balance, with lines in reverse order.

waxy.AlignItems

Alignment of items along the cross axis.

The Safe* members are the CSS safe variants: an item that would overflow its alignment container is aligned as if Start instead.

Start instance-attribute

Start: AlignItems

Align to the start of the cross axis.

End instance-attribute

Align to the end of the cross axis.

FlexStart instance-attribute

FlexStart: AlignItems

Align to the start of the cross axis (respects flex-direction).

FlexEnd instance-attribute

FlexEnd: AlignItems

Align to the end of the cross axis (respects flex-direction).

Center instance-attribute

Center: AlignItems

Center along the cross axis.

Baseline instance-attribute

Baseline: AlignItems

Align to the first baseline.

Stretch instance-attribute

Stretch: AlignItems

Stretch to fill the cross axis.

SelfStart instance-attribute

SelfStart: AlignItems

Align to the start side of the item's own writing direction.

SelfEnd instance-attribute

SelfEnd: AlignItems

Align to the end side of the item's own writing direction.

SafeStart instance-attribute

SafeStart: AlignItems

safe start.

SafeEnd instance-attribute

SafeEnd: AlignItems

safe end.

SafeFlexStart instance-attribute

SafeFlexStart: AlignItems

safe flex-start.

SafeFlexEnd instance-attribute

SafeFlexEnd: AlignItems

safe flex-end.

SafeCenter instance-attribute

SafeCenter: AlignItems

safe center.

SafeSelfStart instance-attribute

SafeSelfStart: AlignItems

safe self-start.

SafeSelfEnd instance-attribute

SafeSelfEnd: AlignItems

safe self-end.

waxy.AlignContent

Alignment of content within the container.

The Safe* members are the CSS safe variants: content that would overflow the container is aligned as if Start instead.

Start instance-attribute

Start: AlignContent

Pack lines to the start of the container.

End instance-attribute

Pack lines to the end of the container.

FlexStart instance-attribute

FlexStart: AlignContent

Pack lines to the start of the container (respects flex-direction).

FlexEnd instance-attribute

FlexEnd: AlignContent

Pack lines to the end of the container (respects flex-direction).

Center instance-attribute

Center: AlignContent

Center lines within the container.

Stretch instance-attribute

Stretch: AlignContent

Stretch lines to fill the container.

SpaceBetween instance-attribute

SpaceBetween: AlignContent

Distribute lines evenly; first line at start, last at end.

SpaceEvenly instance-attribute

SpaceEvenly: AlignContent

Distribute lines with equal space around each line.

SpaceAround instance-attribute

SpaceAround: AlignContent

Distribute lines with half-size spaces on the edges.

SafeStart instance-attribute

SafeStart: AlignContent

safe start.

SafeEnd instance-attribute

SafeEnd: AlignContent

safe end.

SafeFlexStart instance-attribute

SafeFlexStart: AlignContent

safe flex-start.

SafeFlexEnd instance-attribute

SafeFlexEnd: AlignContent

safe flex-end.

SafeCenter instance-attribute

SafeCenter: AlignContent

safe center.

waxy.Overflow

How content overflows its container.

Visible instance-attribute

Visible: Overflow

Content is not clipped and may overflow.

Clip instance-attribute

Clip: Overflow

Content is clipped without a scrollbar.

Hidden instance-attribute

Hidden: Overflow

Content is clipped and hidden; scroll position cannot be changed programmatically.

Scroll instance-attribute

Scroll: Overflow

Content is clipped but scrollable.

waxy.GridAutoFlow

How grid items are auto-placed.

Row instance-attribute

Place items by filling each row.

Column instance-attribute

Column: GridAutoFlow

Place items by filling each column.

RowDense instance-attribute

RowDense: GridAutoFlow

Place items by filling each row, backfilling gaps.

ColumnDense instance-attribute

ColumnDense: GridAutoFlow

Place items by filling each column, backfilling gaps.

waxy.BoxSizing

Box sizing model.

BorderBox instance-attribute

BorderBox: BoxSizing

Width and height include padding and border.

ContentBox instance-attribute

ContentBox: BoxSizing

Width and height apply to the content area only.

waxy.TextAlign

Text alignment.

Auto instance-attribute

Auto: TextAlign

Automatic text alignment.

LegacyLeft instance-attribute

LegacyLeft: TextAlign

Left-aligned text.

LegacyRight instance-attribute

LegacyRight: TextAlign

Right-aligned text.

LegacyCenter instance-attribute

LegacyCenter: TextAlign

Centered text.

waxy.Direction

The inline direction of a node's content (CSS direction).

Ltr instance-attribute

Ltr: Direction

Left to right.

Rtl instance-attribute

Rtl: Direction

Right to left.

waxy.Float

Which side a node floats to within a block container (CSS float).

Left instance-attribute

Left: Float

Float to the left side.

Right instance-attribute

Right: Float

Float to the right side.

Nil instance-attribute

Nil: Float

Do not float (maps to CSS float: none).

waxy.Clear

Which preceding floats a node is moved below (CSS clear).

Left instance-attribute

Left: Clear

Move below left floats.

Right instance-attribute

Right: Clear

Move below right floats.

Both instance-attribute

Both: Clear

Move below all floats.

Nil instance-attribute

Nil: Clear

Do not clear floats (maps to CSS clear: none).

waxy.Contain

CSS containment (contain). Taffy supports the layout and paint containment types.

Nil instance-attribute

Nil: Contain

No containment (maps to CSS contain: none).

Layout instance-attribute

Layout: Contain

Layout containment.

The node establishes an independent formatting context and has no baseline.

Paint instance-attribute

Paint: Contain

Paint containment: the node establishes an independent formatting context.

Content instance-attribute

Content: Contain

Both layout and paint containment (CSS contain: content).

Exceptions

Exception
 ├── KeyError
 │    └── InvalidNodeId [TaffyException]
 ├── ValueError
 │    ├── InvalidPercent [WaxyException]
 │    ├── InvalidLength [WaxyException]
 │    ├── InvalidGridLine [WaxyException]
 │    ├── InvalidGridSpan [WaxyException]
 │    ├── InvalidFlexLineCount [WaxyException]
 │    ├── InvalidRepeat [WaxyException]
 │    ├── InvalidGridTemplateArea [WaxyException]
 │    └── InvalidGridTemplateAreas [WaxyException]
 └── WaxyException
      ├── InvalidPercent [ValueError]
      ├── InvalidLength [ValueError]
      ├── InvalidGridLine [ValueError]
      ├── InvalidGridSpan [ValueError]
      ├── InvalidFlexLineCount [ValueError]
      ├── InvalidRepeat [ValueError]
      ├── InvalidGridTemplateArea [ValueError]
      ├── InvalidGridTemplateAreas [ValueError]
      └── TaffyException
           ├── ChildIndexOutOfBounds
           ├── InvalidParentNode
           ├── InvalidChildNode
           ├── InvalidInputNode
           └── InvalidNodeId [KeyError]

waxy.WaxyException

Bases: Exception

Base exception for all waxy errors.

waxy.TaffyException

Bases: WaxyException

Base exception for all taffy errors.

waxy.InvalidPercent

Bases: WaxyException, ValueError

Raised when Percent(value) is called with a value outside [0.0, 1.0].

waxy.InvalidLength

Bases: WaxyException, ValueError

Raised when Length(value) is called with a NaN value.

waxy.InvalidGridLine

Bases: WaxyException, ValueError

Raised when GridLine(index) is called with index 0 (grid lines are 1-based).

waxy.InvalidGridSpan

Bases: WaxyException, ValueError

Raised when GridSpan(count) is called with count 0 (must span at least 1 track).

waxy.InvalidFlexLineCount

Bases: WaxyException, ValueError

Raised when Style(flex_line_count=...) is given 0 (a flex container has at least 1 line).

waxy.InvalidRepeat

Bases: WaxyException, ValueError

Raised when Repeat(...) is given invalid arguments.

That is: a count of 0, no tracks, or a line_names list that is neither empty nor one longer than tracks.

waxy.InvalidGridTemplateArea

Bases: WaxyException, ValueError

Raised when GridTemplateArea(...) has a start line of 0 or an end line before its start.

waxy.InvalidGridTemplateAreas

Bases: WaxyException, ValueError

Raised when a GridTemplateAreas is invalid.

That is: an area extends past row_count/column_count, two areas share a name, or GridTemplateAreas.from_strings(...) is given a template CSS would reject (ragged rows, non-rectangular areas, or invalid characters).

waxy.InvalidNodeId

Bases: TaffyException, KeyError

Raised when a node ID is not valid (node may have been removed).

waxy.ChildIndexOutOfBounds

Bases: TaffyException

Child index is out of bounds.

waxy.InvalidParentNode

Bases: TaffyException

Parent node is invalid.

waxy.InvalidChildNode

Bases: TaffyException

Child node is invalid.

waxy.InvalidInputNode

Bases: TaffyException

Input node is invalid.