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

LibWeb: Calculate the height of the css grid correctly

Enable the CSS grid height to be calculated correclly.
This commit is contained in:
martinfalisse 2022-10-15 12:45:42 +02:00 committed by Andreas Kling
parent b6a29ae9e2
commit f7bd1edde3

View file

@ -276,6 +276,12 @@ float FormattingContext::compute_auto_height_for_block_level_element(Box const&
// NOTE: The automatic block size of a block-level flex container is its max-content size.
return calculate_max_content_height(box, available_space.width);
}
if (display.is_grid_inside()) {
// https://www.w3.org/TR/css-grid-2/#intrinsic-sizes
// In both inline and block formatting contexts, the grid containers auto block size is its
// max-content size.
return calculate_max_content_height(box, available_space.width);
}
// https://www.w3.org/TR/CSS22/visudet.html#normal-block
// 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'