mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Support parsing columns
This commit is contained in:
parent
23b4367c9c
commit
c42679597a
Notes:
github-actions[bot]
2024-08-26 07:27:18 +00:00
Author: https://github.com/samfry13
Commit: c42679597a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1156
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 94 additions and 0 deletions
|
@ -93,6 +93,19 @@ String ShorthandStyleValue::to_string() const
|
|||
bottom_right.vertical_radius().to_string(),
|
||||
bottom_left.vertical_radius().to_string()));
|
||||
}
|
||||
case PropertyID::Columns: {
|
||||
auto column_width = longhand(PropertyID::ColumnWidth)->to_string();
|
||||
auto column_count = longhand(PropertyID::ColumnCount)->to_string();
|
||||
|
||||
if (column_width == column_count)
|
||||
return column_width;
|
||||
if (column_width.equals_ignoring_ascii_case("auto"sv))
|
||||
return column_count;
|
||||
if (column_count.equals_ignoring_ascii_case("auto"sv))
|
||||
return column_width;
|
||||
|
||||
return MUST(String::formatted("{} {}", column_width, column_count));
|
||||
}
|
||||
case PropertyID::Flex:
|
||||
return MUST(String::formatted("{} {} {}", longhand(PropertyID::FlexGrow)->to_string(), longhand(PropertyID::FlexShrink)->to_string(), longhand(PropertyID::FlexBasis)->to_string()));
|
||||
case PropertyID::FlexFlow:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue