diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index 00b3bb2b54..b4ea5044fa 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -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 diff --git a/Userland/Libraries/LibWeb/CSS/Enums.json b/Userland/Libraries/LibWeb/CSS/Enums.json index a3be4e339e..6afb33b19a 100644 --- a/Userland/Libraries/LibWeb/CSS/Enums.json +++ b/Userland/Libraries/LibWeb/CSS/Enums.json @@ -1,5 +1,6 @@ { "align-content": [ + "normal", "flex-start", "flex-end", "center", diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index 4f8f3fed7d..7015c5e09f 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -17,7 +17,7 @@ }, "align-content": { "inherited": false, - "initial": "stretch", + "initial": "normal", "valid-types": [ "align-content" ] diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index 953d3e76f0..2c0aebe9c6 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -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 container’s inner cross size,