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
somewhere in the dependency tree.default-features = false - 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.
Affects
traits::TaffyNode.get_flexbox_container_style
,traits::TaffyNode.get_flexbox_item_style
… - grid default
-
Enables the CSS Grid layout algorithm.
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 - alloc
-
Allow Taffy to depend on the alloc library