1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:17:35 +00:00

LibWeb: Add support for "align-content: normal" in CSS parser

This commit is contained in:
Aliaksandr Kalenik 2024-01-04 08:13:37 +01:00 committed by Andreas Kling
parent fa24fbf120
commit b395cfccb0
4 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
-webkit-appearance: auto
accent-color: auto
align-content: stretch
align-content: normal
align-items: normal
align-self: auto
animation-delay: 0s

View file

@ -1,5 +1,6 @@
{
"align-content": [
"normal",
"flex-start",
"flex-end",
"center",

View file

@ -17,7 +17,7 @@
},
"align-content": {
"inherited": false,
"initial": "stretch",
"initial": "normal",
"valid-types": [
"align-content"
]

View file

@ -1637,6 +1637,7 @@ void FlexFormattingContext::align_all_flex_lines()
break;
}
case CSS::AlignContent::Normal:
case CSS::AlignContent::Stretch:
start_of_current_line = 0;
break;
@ -2146,7 +2147,7 @@ void FlexFormattingContext::handle_align_content_stretch()
return;
// align-content is stretch,
if (flex_container().computed_values().align_content() != CSS::AlignContent::Stretch)
if (flex_container().computed_values().align_content() != CSS::AlignContent::Stretch && flex_container().computed_values().align_content() != CSS::AlignContent::Normal)
return;
// and the sum of the flex lines' cross sizes is less than the flex containers inner cross size,