summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/css3/flexbox/flex-align-stretch.html
blob: 464441e8f6ca79a70ade534b39f1a80694dfcebd (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<link href="resources/flexbox.css" rel="stylesheet">
<style>
body {
    margin: 0;
}
.flexbox {
    background-color: #aaa;
    position: relative;
}
.flexbox div {
    border: 0;
}

.flexbox > :nth-child(1) {
    background-color: blue;
}
.flexbox > :nth-child(2) {
    background-color: green;
}
.flexbox > :nth-child(3) {
    background-color: red;
}

.absolute {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: yellow !important;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.flexbox')">
<div class="flexbox" style="width: 600px">
  <div data-expected-height="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="50" class="absolute" style="bottom:0;"></div>
  </div>
  <div data-expected-height="100" class="flex-one" style="height: 100px"></div>
  <div data-expected-height="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="50" class="absolute" style="bottom:0;"></div>
  </div>
</div>

<div style="-webkit-writing-mode: horizontal-bt">
<div class="flexbox" style="width: 600px">
  <div data-expected-height="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="0" class="absolute" style="top:0;"></div>
  </div>
  <div data-expected-height="100" class="flex-one" style="height: 100px"></div>
  <div data-expected-height="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="50" class="absolute" style="bottom:0;"></div>
  </div>
</div>
</div>

<div style="-webkit-writing-mode: vertical-rl">
<div class="flexbox" style="height: 200px">
  <div data-expected-width="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="0" class="absolute" style="left:0;"></div>
  </div>
  <div data-expected-width="100" class="flex-one" style="width: 100px"></div>
  <div data-expected-width="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="0" class="absolute" style="left:0;"></div>
  </div>
</div>
</div>

<div style="-webkit-writing-mode: vertical-lr">
<div class="flexbox" style="height: 200px">
  <div data-expected-width="100" class="flex-one" style="position: relative">
    <div data-offset-x="50" data-offset-y="0" class="absolute" style="right:0;"></div>
  </div>
  <div data-expected-width="100" class="flex-one" style="width: 100px"></div>
  <div data-expected-width="100" class="flex-one" style="position: relative">
    <div data-offset-x="0" data-offset-y="0" class="absolute" style="left:0;"></div>
  </div>
</div>
</div>

<div class="flexbox" style="height: 50px; width: 600px;">
  <div data-expected-height="50" style="background-color: yellow; width: 300px">
    <div data-expected-height="60" style="height: 60px; width: 10px; background-color: orange"></div>
  </div>
</div>

<div class="flexbox column" style="width: 100px;">
  <div data-expected-width="100" data-expected-height="50" style="background-color: yellow;">
    <div data-expected-width="200" style="height: 50px; width: 200px; background-color: orange"></div>
  </div>
</div>

</html>