Rename FlexboxLayout back to Style (#251)
1pub fn compute() {
2 let mut taffy = taffy::Taffy::new();
3 let node0 = taffy
4 .new_with_children(
5 taffy::style::Style { flex_basis: taffy::style::Dimension::Points(100f32), ..Default::default() },
6 &[],
7 )
8 .unwrap();
9 let node1 = taffy
10 .new_with_children(
11 taffy::style::Style { flex_basis: taffy::style::Dimension::Points(50f32), ..Default::default() },
12 &[],
13 )
14 .unwrap();
15 let node = taffy
16 .new_with_children(
17 taffy::style::Style {
18 size: taffy::geometry::Size {
19 width: taffy::style::Dimension::Points(100f32),
20 height: taffy::style::Dimension::Points(100f32),
21 ..Default::default()
22 },
23 ..Default::default()
24 },
25 &[node0, node1],
26 )
27 .unwrap();
28 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
29}