mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibWeb: Initial offset in reverse flex layout moved to opposite side
This change moves the initial offset for justify-content: center to the opposite side if the flex layout is in the reverse direction.
This commit is contained in:
parent
6ae208dbf6
commit
8200d1f68b
3 changed files with 33 additions and 0 deletions
|
@ -1268,6 +1268,9 @@ void FlexFormattingContext::distribute_any_remaining_free_space()
|
|||
break;
|
||||
case CSS::JustifyContent::Center:
|
||||
initial_offset = (inner_main_size(flex_container()) - used_main_space) / 2.0f;
|
||||
if (is_direction_reverse()) {
|
||||
initial_offset = inner_main_size(flex_container()) - initial_offset;
|
||||
}
|
||||
break;
|
||||
case CSS::JustifyContent::SpaceBetween:
|
||||
space_between_items = flex_line.remaining_free_space / (number_of_items - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue