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

LibWeb: Replace PlaceItemsStyleValue with ShorthandStyleValue

This commit is contained in:
Sam Atkins 2023-09-20 15:30:36 +01:00 committed by Sam Atkins
parent 8143d48161
commit 6e311902de
10 changed files with 13 additions and 78 deletions

View file

@ -154,6 +154,13 @@ String ShorthandStyleValue::to_string() const
return align_content;
return MUST(String::formatted("{} {}", align_content, justify_content));
}
case PropertyID::PlaceItems: {
auto align_items = longhand(PropertyID::AlignItems)->to_string();
auto justify_items = longhand(PropertyID::JustifyItems)->to_string();
if (align_items == justify_items)
return align_items;
return MUST(String::formatted("{} {}", align_items, justify_items));
}
case PropertyID::PlaceSelf: {
auto align_self = longhand(PropertyID::AlignSelf)->to_string();
auto justify_self = longhand(PropertyID::JustifySelf)->to_string();