Cargo Features

[dependencies]
compose-taffy = { version = "0.3.0", default-features = false, features = ["block_layout", "flexbox", "grid", "content_size", "serde", "alloc"] }
default = block_layout, content_size, flexbox, grid

These default features are set whenever compose-taffy is added without default-features = false somewhere in the dependency tree.

block_layout default

Enables the Block layout algorithm.

Enables block_layout of taffy

Affects traits::TaffyNode.get_block_container_style, traits::TaffyNode.get_block_item_style

flexbox default

Enables the Flexbox layout algorithm.

Enables flexbox of taffy

Affects traits::TaffyNode.get_flexbox_container_style, traits::TaffyNode.get_flexbox_item_style

grid default

Enables the CSS Grid layout algorithm.

Enables grid of taffy

Affects traits::TaffyNode.get_grid_container_style, traits::TaffyNode.get_grid_item_style

content_size default

Causes all algorithms to compute and output a content size for each node

Enables content_size of taffy

serde

Add serde derives to Style structs

Enables serde of taffy

alloc

Allow Taffy to depend on the alloc library

Enables alloc of taffy