From 3ae82502674d5659b12777553c73ee8dbe621e4d Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Tue, 22 Oct 2024 12:08:05 +0900 Subject: [PATCH] Fix bug --- src/compute/flexbox.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compute/flexbox.rs b/src/compute/flexbox.rs index 91e89775f..1ff0266be 100644 --- a/src/compute/flexbox.rs +++ b/src/compute/flexbox.rs @@ -900,7 +900,9 @@ fn determine_container_main_size( .iter() .map(|child| { let padding_border_sum = (child.padding + child.border).main_axis_sum(constants.dir); - (child.flex_basis + child.margin.main_axis_sum(constants.dir)).max(padding_border_sum) + (child.flex_basis.maybe_max(child.min_size.main(constants.dir)) + + child.margin.main_axis_sum(constants.dir)) + .max(padding_border_sum) }) .sum::(); total_target_size + line_main_axis_gap @@ -924,7 +926,9 @@ fn determine_container_main_size( .iter() .map(|child| { let padding_border_sum = (child.padding + child.border).main_axis_sum(constants.dir); - (child.flex_basis + child.margin.main_axis_sum(constants.dir)).max(padding_border_sum) + (child.flex_basis.maybe_max(child.min_size.main(constants.dir)) + + child.margin.main_axis_sum(constants.dir)) + .max(padding_border_sum) }) .sum::(); total_target_size + line_main_axis_gap