mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb/CSS: Remove unnecessary shorthand serialization special cases
The serialization of these properties is improved by using the new default behavior.
This commit is contained in:
parent
63228477a4
commit
263cb3f8ca
Notes:
github-actions[bot]
2025-04-07 10:40:01 +00:00
Author: https://github.com/tcl3
Commit: 263cb3f8ca
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4259
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 72 additions and 19 deletions
|
@ -194,8 +194,6 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
|
|||
}
|
||||
case PropertyID::Flex:
|
||||
return MUST(String::formatted("{} {} {}", longhand(PropertyID::FlexGrow)->to_string(mode), longhand(PropertyID::FlexShrink)->to_string(mode), longhand(PropertyID::FlexBasis)->to_string(mode)));
|
||||
case PropertyID::FlexFlow:
|
||||
return MUST(String::formatted("{} {}", longhand(PropertyID::FlexDirection)->to_string(mode), longhand(PropertyID::FlexWrap)->to_string(mode)));
|
||||
case PropertyID::Font: {
|
||||
auto font_style = longhand(PropertyID::FontStyle);
|
||||
auto font_variant = longhand(PropertyID::FontVariant);
|
||||
|
@ -350,8 +348,6 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
|
|||
return start->to_string(mode);
|
||||
return MUST(String::formatted("{} / {}", start->to_string(mode), end->to_string(mode)));
|
||||
}
|
||||
case PropertyID::ListStyle:
|
||||
return MUST(String::formatted("{} {} {}", longhand(PropertyID::ListStylePosition)->to_string(mode), longhand(PropertyID::ListStyleImage)->to_string(mode), longhand(PropertyID::ListStyleType)->to_string(mode)));
|
||||
case PropertyID::Overflow: {
|
||||
auto overflow_x = longhand(PropertyID::OverflowX);
|
||||
auto overflow_y = longhand(PropertyID::OverflowY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue