Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

24
vendor/taffy/examples/flexbox_gap.rs vendored Normal file
View File

@@ -0,0 +1,24 @@
use taffy::prelude::*;
// Creates three 20px x 20px children, evenly spaced 10px apart from each other
// Thus the container is 80px x 20px.
fn main() -> Result<(), taffy::TaffyError> {
let mut taffy: TaffyTree<()> = TaffyTree::new();
let child_style = Style { size: Size { width: length(20.0), height: length(20.0) }, ..Default::default() };
let child0 = taffy.new_leaf(child_style.clone())?;
let child1 = taffy.new_leaf(child_style.clone())?;
let child2 = taffy.new_leaf(child_style.clone())?;
let root = taffy.new_with_children(
Style { gap: Size { width: length(10.0), height: zero() }, ..Default::default() },
&[child0, child1, child2],
)?;
// Compute layout and print result
taffy.compute_layout(root, Size::MAX_CONTENT)?;
taffy.print_tree(root);
Ok(())
}