1
0
Fork 0
firefox/testing/web-platform/tests/css/css-sizing/stretch/block-height-005.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

63 lines
1.7 KiB
HTML

<!DOCTYPE html>
<link rel="help"
href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11044">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src="/resources/check-layout-th.js"></script>
<meta name="assert"
content="stretch sizing treating margins as 0 isn't affected by preceding floats">
<style>
.outer {
width: 100px;
height: 100px;
outline: solid;
position: relative;
}
.float {
float: left;
width: 30px;
height: 30px;
background: skyblue;
}
</style>
<p>These tests assert the behavior described at
https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2599101601
</p>
<div class="outer">
<div class="float"></div>
<div
style="height: stretch; width: 30px; margin-top: 50px; display: flow-root; border: solid magenta;"
data-expected-height="100" data-offset-y="0">
</div>
</div>
<div class="outer">
<div class="float"></div>
<div
style="height: stretch; width: 90px; margin-top: 50px; display: flow-root; border: solid cyan;"
data-expected-height="100" data-offset-y="30">
</div>
</div>
<div class="outer">
<div class="float"></div>
<div
style="height: stretch; width: 90px; margin-top: 50px; border: solid green;"
data-expected-height="100" data-offset-y="0">
</div>
</div>
<div class="outer">
<div class="float"></div>
<div
style="height: stretch; width: 90px; clear: both; margin-top: 50px; border: solid orange;"
data-expected-height="100" data-offset-y="30">
</div>
</div>
<script>checkLayout(".float + div")</script>