1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibWeb: Treat flex item's cyclic percentage cross size as auto

This fixes an issue where e.g `height: 100%` on a flex item whose
container has indefinite height was being resolved to 0. It now
correctly behaves the same as auto.
This commit is contained in:
Andreas Kling 2023-03-18 00:24:51 +01:00
parent 062b8e5957
commit 1dc074fc18
3 changed files with 25 additions and 1 deletions

View file

@ -1103,7 +1103,7 @@ void FlexFormattingContext::determine_hypothetical_cross_size_of_item(FlexItem&
return;
}
if (computed_cross_size(item.box).is_auto()) {
if (should_treat_cross_size_as_auto(item.box)) {
// Item has automatic cross size, layout with "fit-content"
CSSPixels fit_content_cross_size = 0;