blob: 334f8d5e728dcdd8a573cdffc0570f8eb26f2be9 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<style>
.item {
margin-bottom: 5px;
}
fieldset {
border: 0px;
padding: 0px;
margin: 0px;
margin-bottom: 5px;
}
.ref {
width: 40px;
height:40px;
background-color: green;
position: absolute;
top: 10px;
}
.test {
width: 40px;
height:40px;
background-color: red;
}
.container {
position: relative;
margin: 0px;
padding: 0px;
}
</style>
<body>
https://code.google.com/p/chromium/issues/detail?id=321295
The top and bottom margins of a box collapse together only if they are the "top and bottom margins of a box that does not establish a new block formatting context".
<br>
There should be no red below.
<div class="container">
<div class="ref"></div>
<div style="display: flex; -webkit-flex-direction: column;">
<div class="item"></div>
<div class="item"></div>
<div class="test"></div>
</div>
</div>
<div class="container">
<div class="ref"></div>
<div>
<div class="item" style="overflow:hidden;"></div>
<div class="item" style="overflow:hidden;"></div>
<div class="test"></div>
</div>
</div>
<div class="container">
<div class="ref"></div>
<div>
<div class="item" style="display: table-caption;"></div>
<div class="item" style="display: table-caption;"></div>
<div class="test"></div>
</div>
</div>
<div class="container">
<div class="ref"></div>
<div>
<fieldset></fieldset>
<fieldset></fieldset>
<div class="test"></div>
</div>
</div>
</body>
</html>