tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 1068HTML 999Markdown 12TOML 83186 Definiciones

⎇ b0c7d824daea2c453850812d532c277f8ac37736 benches/generated/position_root_with_rtl_should_position_withoutdirection.rs Rust · 22 líneas · 832 B Historia Quién tocó qué crudo

Fix justify content with margin tests (#329) b0c7d824d · Nico Burns ·

1pub fn compute() {
2    #[allow(unused_imports)]
3    use taffy::prelude::*;
4    let mut taffy = taffy::Taffy::new();
5    let node0 = taffy
6        .new_leaf(taffy::style::Style {
7            size: taffy::geometry::Size {
8                width: taffy::style::Dimension::Points(52f32),
9                height: taffy::style::Dimension::Points(52f32),
10            },
11            inset: taffy::geometry::Rect {
12                left: taffy::style::LengthPercentageAuto::Points(72f32),
13                right: auto(),
14                top: auto(),
15                bottom: auto(),
16            },
17            ..Default::default()
18        })
19        .unwrap();
20    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
21    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
22}