ladybird/Tests/LibWeb/Layout/input/display-contents-blockification-of-flex-items.html
Andreas Kling efd4f63454 LibWeb: Allow blockification across display: contents boundary
Flex/grid items are always blockified (have their CSS display forced
into "block") by style computation.

We were doing this by looking at the CSS display of the parent. However,
if the parent has `display: contents`, we must look at the *grandparent*
instead.

This corrects the layout of buttons underneath Reddit article cards.
2025-08-17 19:09:50 +02:00

28 lines
466 B
HTML

<!doctype html>
<style type="text/css">
* {
outline: 1px solid black;
}
.flex {
display: flex;
}
</style>
<div class="flex">
163
<slot>
<foo-a
><foo-b
><template shadowrootmode="open">
<style>
:host {
display: flex;
border: 5px solid orange;
}
</style>
<slot></slot>
</template>
Share
</foo-b></foo-a
></slot
>
</div>