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:
parent
b6a29ae9e2
commit
f7bd1edde3
1 changed files with 6 additions and 0 deletions
|
@ -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 container’s 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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue