3 <link href=
"resources/flexbox.css" rel=
"stylesheet">
10 background-color: #aaa;
21 -webkit-writing-mode: vertical-rl;
28 .flexbox
> :nth-child(
1) {
29 background-color: blue;
31 .flexbox
> :nth-child(
2) {
32 background-color: green;
34 .flexbox
> :nth-child(
3) {
35 background-color: red;
37 .flexbox
> :nth-child(
4) {
38 background-color: orange;
41 background-color: yellow;
44 <script src=
"../../resources/check-layout.js"></script>
45 <body onload=
"checkLayout('.flexbox')">
46 <div class=
"flexbox column horizontal">
47 <div data-expected-height=
"10" data-offset-y=
"0" style=
"flex: 1 0 10px;"></div>
48 <div data-expected-height=
"10" data-offset-y=
"10" style=
"height: 10px;"></div>
49 <div data-expected-height=
"10" data-offset-y=
"20"><div data-expected-height=
"10" data-offset-y=
"20" style=
"height: 10px"></div></div>
52 <!-- The last div is sized to 0 because there is no available space, however its child overflows. -->
53 <div class=
"flexbox column horizontal">
54 <div data-expected-height=
"0" data-offset-y=
"0" style=
"flex: 1;"></div>
55 <div data-expected-height=
"10" data-offset-y=
"0" style=
"height: 10px;"></div>
56 <div data-expected-height=
"10" data-offset-y=
"10" style=
"flex: 1 auto;"><div style=
"height: 10px"></div></div>
57 <div data-expected-height=
"10" data-offset-y=
"20" style=
"min-height: 0; flex: 1;"><div data-expected-height=
"10" data-offset-y=
"20" class=
"child-div" style=
"height: 10px"></div></div>
60 <div class=
"flexbox column horizontal">
61 <div data-expected-height=
"10" data-offset-y=
"10" style=
"flex: 1 0 10px; margin-top: 10px;"></div>
62 <div data-expected-height=
"10" data-offset-y=
"20" style=
"height: 10px; margin-bottom: 20px;"></div>
63 <div data-expected-height=
"20" data-offset-y=
"50" style=
"padding-top: 10px"><div data-expected-height=
"10" data-offset-y=
"60" style=
"height: 10px"></div></div>
66 <!-- Same as previous test case but with a justify-content set. Since there's no
67 available space, it should layout the same. -->
68 <div class=
"flexbox column horizontal justify-content-space-between">
69 <div data-expected-height=
"10" data-offset-y=
"10" style=
"flex: 1 0 10px; margin-top: 10px;"></div>
70 <div data-expected-height=
"10" data-offset-y=
"20" style=
"height: 10px; margin-bottom: 20px;"></div>
71 <div data-expected-height=
"20" data-offset-y=
"50" style=
"padding-top: 10px"><div data-expected-height=
"10" data-offset-y=
"60" style=
"height: 10px"></div></div>
74 <div class=
"flexbox column horizontal" data-expected-height=
"20">
75 <div data-expected-height=
"10" data-offset-y=
"0" style=
"flex: 0 1 auto;"><div style=
"height: 10px"></div></div>
76 <div data-expected-height=
"10" data-offset-y=
"10" style=
"flex: 0 2 auto;"><div style=
"height: 10px"></div></div>
79 <div class=
"flexbox column horizontal" style=
"min-height: 10px" data-expected-height=
"20">
80 <div data-expected-height=
"10" data-offset-y=
"0" style=
"flex: 0 1 auto;"><div style=
"height: 10px"></div></div>
81 <div data-expected-height=
"10" data-offset-y=
"10" style=
"flex: 0 2 auto;"><div style=
"height: 10px"></div></div>
84 <div class=
"flexbox column horizontal" style=
"min-height: 5px; max-height: 17px;" data-expected-height=
"17">
85 <div data-expected-height=
"9" data-offset-y=
"0" style=
"min-height: 0; flex: 0 1 auto;"><div style=
"height: 10px"></div></div>
86 <div data-expected-height=
"8" data-offset-y=
"9" style=
"min-height: 0; flex: 0 2 auto;"><div style=
"height: 10px"></div></div>
89 <div class=
"flexbox column horizontal" style=
"min-height: 5px; max-height: 30px; padding-top: 1px; padding-bottom: 2px;" data-expected-height=
"33">
90 <div data-expected-height=
"15" data-offset-y=
"1" style=
"min-height: 0; flex: 0 1 auto;"><div style=
"height: 20px"></div></div>
91 <div data-expected-height=
"15" data-offset-y=
"16" style=
"min-height: 0; flex: 0 1 auto;"><div style=
"height: 20px"></div></div>
94 <div class=
"flexbox column horizontal">
95 <div data-expected-client-height=
"10" data-offset-y=
"0" style=
"overflow: scroll"><div data-expected-height=
10 style=
"height: 10px"></div></div>
98 <div class=
"flexbox column vertical">
99 <div data-expected-width=
"10" data-offset-x=
"20" style=
"flex: 1 0 10px;"></div>
100 <div data-expected-width=
"10" data-offset-x=
"10" style=
"width: 10px;"></div>
101 <div data-expected-width=
"10" data-offset-x=
"0"><div data-expected-width=
"10" data-offset-x=
"0" style=
"width: 10px"></div></div>
104 <!-- The first div overflows to the left, so give it a margin-left so we can see box it paints. -->
105 <div class=
"flexbox column vertical" style=
"margin-left: 100px;">
106 <div data-expected-width=
"50" data-offset-x=
"20" style=
"min-width: 0; flex: 1;"><div data-expected-width=
"50" data-offset-x=
"20" class=
"child-div" style=
"width: 50px"></div></div>
107 <div data-expected-width=
"0" data-offset-x=
"20" style=
"flex: 1;"></div>
108 <div data-expected-width=
"10" data-offset-x=
"10" style=
"width: 10px;"></div>
109 <div data-expected-width=
"10" data-offset-x=
"0" style=
"flex: 1 auto;"><div style=
"width: 10px"></div></div>