mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
LibWeb: Use right offset for justify-content: flex-end
Offsets in this algorithm are relative to the starting position, so it should be 0 whether its `flex-start` or `flex-end`.
This commit is contained in:
parent
a6e1b9eed2
commit
b7003194d2
1 changed files with 1 additions and 9 deletions
|
@ -1106,16 +1106,8 @@ void FlexFormattingContext::distribute_any_remaining_free_space()
|
|||
|
||||
switch (flex_container().computed_values().justify_content()) {
|
||||
case CSS::JustifyContent::FlexStart:
|
||||
if (is_direction_reverse())
|
||||
space_before_first_item = m_available_space->main.value_or(NumericLimits<float>::max());
|
||||
else
|
||||
space_before_first_item = 0;
|
||||
break;
|
||||
case CSS::JustifyContent::FlexEnd:
|
||||
if (is_direction_reverse())
|
||||
space_before_first_item = 0;
|
||||
else
|
||||
space_before_first_item = m_available_space->main.value_or(NumericLimits<float>::max());
|
||||
space_before_first_item = 0;
|
||||
break;
|
||||
case CSS::JustifyContent::Center:
|
||||
space_before_first_item = (m_available_space->main.value_or(NumericLimits<float>::max()) - used_main_space) / 2.0f;
|
||||
|
|
Loading…
Add table
Reference in a new issue