diff --git a/src/flexbox.rs b/src/flexbox.rs
index 5201de25f..994b505a8 100644
--- a/src/flexbox.rs
+++ b/src/flexbox.rs
@@ -229,8 +229,8 @@ impl Forest {
};
let node_inner_size = Size {
- width: Some(node_size.width.unwrap_or_default() - padding_border.horizontal_axis_sum()),
- height: Some(node_size.height.unwrap_or_default() - padding_border.vertical_axis_sum()),
+ width: node_size.width.maybe_sub(padding_border.horizontal_axis_sum()),
+ height: node_size.height.maybe_sub(padding_border.vertical_axis_sum()),
};
let container_size = Size::zero();
@@ -307,19 +307,19 @@ impl Forest {
parent_size: Size