⎇ 6652882a96948b4d8ee433a176d428cf3c3916bf
benches/generated/grid_basic_implicit_tracks.rs
History
Who touched what
raw
1pub fn compute() {
2 #[allow(unused_imports)]
3 use taffy::prelude::*;
4 let mut taffy = taffy::Taffy::new();
5 let node0 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
6 let node1 = taffy
7 .new_leaf(taffy::style::Style {
8 size: taffy::geometry::Size {
9 width: taffy::style::Dimension::Points(35f32),
10 height: taffy::style::Dimension::Points(35f32),
11 },
12 ..Default::default()
13 })
14 .unwrap();
15 let node = taffy
16 .new_with_children(
17 taffy::style::Style {
18 display: taffy::style::Display::Grid,
19 grid_template_rows: vec![points(40f32)],
20 grid_template_columns: vec![points(40f32)],
21 ..Default::default()
22 },
23 &[node0, node1],
24 )
25 .unwrap();
26 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
27}