mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Flexbox: Don't outgrow parent in main axis when using wrap
This commit is contained in:
parent
6283086c2f
commit
0c0951d2ce
Notes:
sideshowbarker
2024-07-18 03:04:01 +09:00
Author: https://github.com/TobyAsE Commit: https://github.com/SerenityOS/serenity/commit/0c0951d2ce4 Pull-request: https://github.com/SerenityOS/serenity/pull/10353
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…
Reference in a new issue