mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
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!
This commit is contained in:
parent
68459d43e0
commit
b97229c9b5
3 changed files with 31 additions and 1 deletions
|
@ -0,0 +1,18 @@
|
|||
<!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
|
Loading…
Add table
Add a link
Reference in a new issue