1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibWeb: Replace all px Length creation with Length::make_px(CSSPixels)

This commit is contained in:
Sam Atkins 2022-11-08 16:58:15 +00:00 committed by Linus Groh
parent 13b1952929
commit 7d40e3eb0d
5 changed files with 4 additions and 16 deletions

View file

@ -5028,7 +5028,7 @@ RefPtr<StyleValue> Parser::parse_flex_value(Vector<ComponentValue> const& compon
// Zero is a valid value for basis, but only if grow and shrink are already specified.
if (value->has_number() && value->to_number() == 0) {
if (flex_grow && flex_shrink && !flex_basis) {
flex_basis = LengthStyleValue::create(Length(0, Length::Type::Px));
flex_basis = LengthStyleValue::create(Length::make_px(0));
continue;
}
}