tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 231Rust 9TOML 3CSS 1345 Definiciones

⎇ 0.1.x benches/generated/min_height_overrides_height_on_root.rs Rust · 17 líneas · 608 B Historia Quién tocó qué crudo

Rename sprawl to taffy (#134) 8936790d6 · Alice Cecile ·

1pub fn compute() {
2    let mut taffy = taffy::Taffy::new();
3    let node = taffy
4        .new_node(
5            taffy::style::Style {
6                size: taffy::geometry::Size { height: taffy::style::Dimension::Points(50f32), ..Default::default() },
7                min_size: taffy::geometry::Size {
8                    height: taffy::style::Dimension::Points(100f32),
9                    ..Default::default()
10                },
11                ..Default::default()
12            },
13            &[],
14        )
15        .unwrap();
16    taffy.compute_layout(node, taffy::geometry::Size::undefined()).unwrap();
17}