mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibWeb: Improve align-items in abspos static position of flex child
Basically, just support more values. And add a test. :^)
This commit is contained in:
parent
80a734d42e
commit
793c2ff65a
3 changed files with 120 additions and 0 deletions
|
@ -2125,10 +2125,13 @@ CSSPixelPoint FlexFormattingContext::calculate_static_position(Box const& box) c
|
|||
// Fallthrough
|
||||
case CSS::AlignItems::Start:
|
||||
case CSS::AlignItems::FlexStart:
|
||||
case CSS::AlignItems::SelfStart:
|
||||
case CSS::AlignItems::Stretch:
|
||||
case CSS::AlignItems::Normal:
|
||||
cross_offset = -half_line_size + cross_margin_before + cross_border_before + cross_padding_before;
|
||||
break;
|
||||
case CSS::AlignItems::End:
|
||||
case CSS::AlignItems::SelfEnd:
|
||||
case CSS::AlignItems::FlexEnd:
|
||||
cross_offset = half_line_size - inner_cross_size(box) - cross_margin_after - cross_border_after - cross_padding_after;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue