mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibWeb: Use calculate_min_content_height() for sizing of grid children
When sizing grid children we now also check whether calculate_min_content_height() adds to the computed height. Previously we were using the result of layout_inner() which led to zero height of not specifically sized block level children. This fixes a height issue with our GitHub page. The footer is now at its place and is not hovering over other content anymore.
This commit is contained in:
parent
3dddc02400
commit
2547e0b966
1 changed files with 2 additions and 0 deletions
|
@ -572,6 +572,8 @@ void GridFormattingContext::run(Box const& box, LayoutMode, AvailableSpace const
|
|||
independent_formatting_context->parent_context_did_dimension_child_root_box();
|
||||
if (child_box_state.content_height() > positioned_box.computed_height)
|
||||
positioned_box.computed_height = child_box_state.content_height();
|
||||
if (auto min_content_height = calculate_min_content_height(positioned_box.box, available_space.width); min_content_height > positioned_box.computed_height)
|
||||
positioned_box.computed_height = min_content_height;
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-grid/#overview-sizing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue