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