1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibWeb: Flexbox: Add default value for AlignItems

Previously there was no default value and wrapping broke when the
container didn't have a align-items specified.
This commit is contained in:
Tobias Christiansen 2021-09-16 21:36:38 +02:00 committed by Andreas Kling
parent 6c992e5dce
commit f8ea730f29

View file

@ -30,6 +30,7 @@ public:
static CSS::FlexDirection flex_direction() { return CSS::FlexDirection::Row; }
static CSS::FlexWrap flex_wrap() { return CSS::FlexWrap::Nowrap; }
static CSS::JustifyContent justify_content() { return CSS::JustifyContent::FlexStart; }
static CSS::AlignItems align_items() { return CSS::AlignItems::FlexStart; }
static CSS::Overflow overflow() { return CSS::Overflow::Visible; }
};
@ -161,7 +162,7 @@ protected:
CSS::FlexBasisData flex_basis {};
Optional<float> flex_grow_factor;
Optional<float> flex_shrink_factor;
CSS::AlignItems align_items;
CSS::AlignItems align_items { InitialValues::align_items() };
CSS::JustifyContent justify_content { InitialValues::justify_content() };
CSS::Overflow overflow_x { InitialValues::overflow() };
CSS::Overflow overflow_y { InitialValues::overflow() };