LibWeb: Fill out font property data

This commit is contained in:
Sam Atkins 2023-09-26 16:17:02 +01:00 committed by Andreas Kling
parent 2e3f63fe3b
commit c103269a8e
Notes: sideshowbarker 2024-07-17 08:13:43 +09:00
2 changed files with 13 additions and 1 deletions
Userland/Libraries/LibWeb/CSS

View file

@ -839,8 +839,11 @@
"longhands": [
"font-family",
"font-size",
"font-stretch",
"font-style",
"font-variant",
"font-weight"
"font-weight",
"line-height"
]
},
"font-family": {

View file

@ -97,6 +97,15 @@ String ShorthandStyleValue::to_string() const
return MUST(String::formatted("{} {} {}", longhand(PropertyID::FlexGrow)->to_string(), longhand(PropertyID::FlexShrink)->to_string(), longhand(PropertyID::FlexBasis)->to_string()));
case PropertyID::FlexFlow:
return MUST(String::formatted("{} {}", longhand(PropertyID::FlexDirection)->to_string(), longhand(PropertyID::FlexWrap)->to_string()));
case PropertyID::Font:
return MUST(String::formatted("{} {} {} {} {} / {} {}",
longhand(PropertyID::FontStyle)->to_string(),
longhand(PropertyID::FontVariant)->to_string(),
longhand(PropertyID::FontWeight)->to_string(),
longhand(PropertyID::FontStretch)->to_string(),
longhand(PropertyID::FontSize)->to_string(),
longhand(PropertyID::LineHeight)->to_string(),
longhand(PropertyID::FontFamily)->to_string()));
case PropertyID::GridArea: {
auto& row_start = longhand(PropertyID::GridRowStart)->as_grid_track_placement();
auto& column_start = longhand(PropertyID::GridColumnStart)->as_grid_track_placement();