mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWeb: Flexbox: Don't outgrow parent in main axis when using wrap
This commit is contained in:
parent
6283086c2f
commit
0c0951d2ce
1 changed files with 4 additions and 0 deletions
|
@ -364,6 +364,10 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
|
|||
if (!main_is_constrained) {
|
||||
auto available_main_size = containing_block_effective_main_size(box);
|
||||
main_available_size = available_main_size - sum_of_margin_padding_border_in_main_axis(box);
|
||||
if (box.computed_values().flex_wrap() == CSS::FlexWrap::Wrap || box.computed_values().flex_wrap() == CSS::FlexWrap::WrapReverse) {
|
||||
main_available_size = specified_main_size(*box.containing_block());
|
||||
main_is_constrained = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue