Automatic update from web-platform-tests layout: Let floats know that margins can collapse thru phantom lines Phantom line boxes allow margins to collapse through them. But in the sequential layout state we were assuming that was not the case, so we were placing floats incorrectly. Signed-off-by: Oriol Brufau <obrufau@igalia.com> -- wpt-commits: 1053d9a4de53cc10423b1d2c7ce2da8cc51ffc44 wpt-pr: 57116
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<title>CSS Test: A float after a block which collapses its top margin with its grandparent, where the parent is an inline box</title>
|
|
<link rel="author" href="mailto:obrufau@igalia.com" title="Oriol Brufau">
|
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#floats">
|
|
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#collapsing-margins">
|
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level">
|
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#inline-formatting">
|
|
<link rel="help" href="https://github.com/servo/servo/issues/41734">
|
|
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
|
|
|
|
<style>
|
|
span > div {
|
|
width: 200px;
|
|
height: 100px;
|
|
background: green;
|
|
}
|
|
</style>
|
|
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
|
|
<div style="overflow: hidden">
|
|
<!-- This is just to avoid collapsing margins with the <p>. -->
|
|
</div>
|
|
|
|
<div style="width: 200px; height: 200px; margin-top: -100px; background: red">
|
|
<span>
|
|
<div style="margin-top: 100px"></div>
|
|
<div style="float: left"></div>
|
|
</span>
|
|
</div>
|