1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Replace GridTrackPlacementShorthandStyleValue with ShorthandSV

This commit is contained in:
Sam Atkins 2023-09-20 16:19:37 +01:00 committed by Sam Atkins
parent 8efac89a16
commit e905072e47
12 changed files with 81 additions and 153 deletions

View file

@ -145,6 +145,20 @@ String ShorthandStyleValue::to_string() const
return MUST(String::formatted("{}", construct_rows_string()));
return MUST(String::formatted("{} / {}", construct_rows_string(), columns.grid_track_size_list().to_string()));
}
case PropertyID::GridColumn: {
auto start = longhand(PropertyID::GridColumnStart);
auto end = longhand(PropertyID::GridColumnEnd);
if (end->as_grid_track_placement().grid_track_placement().is_auto())
return start->to_string();
return MUST(String::formatted("{} / {}", start->to_string(), end->to_string()));
}
case PropertyID::GridRow: {
auto start = longhand(PropertyID::GridRowStart);
auto end = longhand(PropertyID::GridRowEnd);
if (end->as_grid_track_placement().grid_track_placement().is_auto())
return start->to_string();
return MUST(String::formatted("{} / {}", start->to_string(), end->to_string()));
}
case PropertyID::ListStyle:
return MUST(String::formatted("{} {} {}", longhand(PropertyID::ListStylePosition)->to_string(), longhand(PropertyID::ListStyleImage)->to_string(), longhand(PropertyID::ListStyleType)->to_string()));
case PropertyID::PlaceContent: {