mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
LibWeb: Flexbox: Wrap inline Nodes if their parent is display: flex
This commit is contained in:
parent
881e9d1341
commit
610f14992a
Notes:
sideshowbarker
2024-07-18 03:20:50 +09:00
Author: https://github.com/TobyAsE Commit: https://github.com/SerenityOS/serenity/commit/610f14992a9 Pull-request: https://github.com/SerenityOS/serenity/pull/10258
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ static Layout::Node& insertion_parent_for_inline_node(Layout::NodeWithStyle& lay
|
|||
if (layout_parent.is_inline() && !layout_parent.is_inline_block())
|
||||
return layout_parent;
|
||||
|
||||
if (layout_parent.computed_values().display() == CSS::Display::Flex) {
|
||||
layout_parent.append_child(layout_parent.create_anonymous_wrapper());
|
||||
}
|
||||
|
||||
if (!layout_parent.has_children() || layout_parent.children_are_inline())
|
||||
return layout_parent;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue