Automatic update from web-platform-tests [layout] Implement stretch and margin collapsing interactions Normally stretched elements shrink to leave room for their margins. But in the case of collapsing margins, not always. If the parent block has no border, no margin, and is not a new BFC, don't leave room for the margin on that edge. Described in more detail at https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2599101601 This behavior is still behind a flag. Change-Id: I3397cd051e777f9c0a346094fa23c5b042d82c2c Bug: 41253915 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180930 Commit-Queue: David Grogan <dgrogan@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1428087} -- wpt-commits: a220728d2ef826fb20651217b1f167590285c2ff wpt-pr: 51117
29 lines
808 B
HTML
29 lines
808 B
HTML
<!DOCTYPE html>
|
|
<link rel="help"
|
|
href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing">
|
|
<meta name="assert"
|
|
content="Both margins are ignored for sizing, but top margin still collapses. Bottom margin doesn't collapse because parent has a definite height.">
|
|
<link rel="match" href="block-height-003-ref.html">
|
|
|
|
<style>
|
|
.surrounding-block {
|
|
width: 100px;
|
|
height: 100px;
|
|
border: solid;
|
|
}
|
|
</style>
|
|
|
|
<!--
|
|
<p>These tests assert the behavior described at
|
|
https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2599101601
|
|
</p>
|
|
-->
|
|
|
|
<div class="surrounding-block"></div>
|
|
<div style="width: 200px; height: 200px; outline: 1px solid;">
|
|
<div
|
|
style="height: stretch; margin: 75px 0px 25px 0px; border: 2px dashed blue;">
|
|
</div>
|
|
</div>
|
|
<div class="surrounding-block"></div>
|