mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:08:10 +00:00
LibWeb: Wrap child text sequences of grid container in anonymous blocks
From spec https://drafts.csswg.org/css-grid/#grid-items: "Each in-flow child of a grid container becomes a grid item, and each child text sequence is wrapped in an anonymous block container grid item." Fixes the problem that text sequences inside grid containers are ignored and not displayed.
This commit is contained in:
parent
537256fae2
commit
94fd17a467
3 changed files with 13 additions and 1 deletions
|
@ -69,7 +69,7 @@ static Layout::Node& insertion_parent_for_inline_node(Layout::NodeWithStyle& lay
|
|||
if (layout_parent.display().is_inline_outside() && layout_parent.display().is_flow_inside())
|
||||
return layout_parent;
|
||||
|
||||
if (layout_parent.display().is_flex_inside()) {
|
||||
if (layout_parent.display().is_flex_inside() || layout_parent.display().is_grid_inside()) {
|
||||
layout_parent.append_child(layout_parent.create_anonymous_wrapper());
|
||||
return *layout_parent.last_child();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue