mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
LibWeb: Use right dimension when positioning flex-items
Previously the cross-size was used to determine the position along the main axis which is obviously wrong.
This commit is contained in:
parent
8cd4a889fe
commit
416559414c
1 changed files with 1 additions and 1 deletions
|
@ -615,7 +615,7 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
|
|||
float used_main_space = 0;
|
||||
size_t auto_margins = 0;
|
||||
for (auto& flex_item : flex_line.items) {
|
||||
used_main_space += flex_item->cross_size;
|
||||
used_main_space += flex_item->main_size;
|
||||
if (is_main_axis_margin_first_auto(flex_item->box))
|
||||
++auto_margins;
|
||||
if (is_main_axis_margin_second_auto(flex_item->box))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue