serenity/Tests/LibWeb/Layout/input/block-and-inline/max-width-on-child-block-with-width-auto-contributes-to-intrinsic-size-of-parent.html
Andreas Kling b97229c9b5 LibWeb: Ignore preferred width when calculating intrinsic width of block
When calculating the intrinsic width of a block-level box, we now ignore
the preferred width entirely, and not just when the preferred width
should be treated as auto.

The condition for this was both confused and wrong, as it looked at the
available width around the box, but didn't check for a width constraint
on the box itself.

Just because the available width has an intrinsic sizing constraint
doesn't mean that the box is undergoing intrinsic sizing. It could also
be the box's containing block!
2023-04-06 16:47:40 +02:00

18 lines
No EOL
308 B
HTML

<!DOCTYPE html><html><style>
* {
border: 1px solid black;
font-family: 'SerenitySans';
}
html { background: white; }
.outer {
display: flex;
background: pink;
}
.inner {
min-width: 200px;
background: orange;
}
</style><body class="outer"><div class="middle"><div class="inner">OPEN