blob: 334f8d5e728dcdd8a573cdffc0570f8eb26f2be9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<!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>
|