Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Oct 22, 2024
1 parent a1f563c commit 3ae8250
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/compute/flexbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<f32>();
total_target_size + line_main_axis_gap
Expand All @@ -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::<f32>();
total_target_size + line_main_axis_gap
Expand Down

0 comments on commit 3ae8250

Please sign in to comment.