blob: e4be84471c1c1f9a957e2c16a50fd750e7221c6b [file] [log] [blame]
<!DOCTYPE html>
<html>
<style>
body {
margin: 0;
}
.flexbox {
width: 600px;
display: -webkit-flex;
background-color: #aaa;
position: relative;
}
.flexbox > * {
-webkit-flex: none;
}
.flexbox > :nth-child(1) {
background-color: blue;
}
.flexbox > :nth-child(2) {
background-color: green;
}
.flexbox > div > :nth-child(1) {
background-color: pink;
}
.flexbox > div > :nth-child(2) {
background-color: purple;
}
.flexbox > div > div > :nth-child(1) {
background-color: red;
}
.flexbox > div > div > :nth-child(2) {
background-color: yellow;
}
.nested {
display: -webkit-flex;
background-color: #ddd;
}
.rtl {
direction: rtl;
}
.bt {
-webkit-writing-mode: horizontal-bt;
}
.vertical-rl {
-webkit-writing-mode: vertical-rl;
}
.vertical-lr {
-webkit-writing-mode: vertical-lr;
}
.row-reverse {
-webkit-flex-flow: row-reverse;
}
.column {
-webkit-flex-flow: column;
}
.column-reverse {
-webkit-flex-flow: column-reverse;
}
.align-start {
-webkit-align-self: flex-start;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.flexbox')">
<div class="flexbox">
<div class="column nested">
<div data-expected-height="50" style="-webkit-flex: 1 0 0; width: 100px;"></div>
<div data-expected-height="50" style="-webkit-flex: 1 0 0; width: 100px;"></div>
</div>
<div data-expected-width="500" style="-webkit-flex: 1 0 0; height:100px;"></div>
</div>
<div class="flexbox">
<div class="column nested align-start">
<div data-expected-height="0" style="-webkit-flex: 1 0 0; width: 100px;"></div>
<div data-expected-height="0" style="-webkit-flex: 1 0 0; width: 100px;"></div>
</div>
<div data-expected-width="500" style="-webkit-flex: 1 0 0; height:100px;"></div>
</div>
<div class="flexbox">
<div class="column nested align-start" style="height: 50px">
<div data-expected-height="25" style="-webkit-flex: 1 0 0; width: 100px;"></div>
<div data-expected-height="25" style="-webkit-flex: 1 0 0; width: 100px;"></div>
</div>
<div data-expected-width="500" style="-webkit-flex: 1 0 0; height:100px;"></div>
</div>
<div class="flexbox">
<div class="column nested" style="height: 50px">
<div class="nested" style="-webkit-flex: 1; width: 100px;">
<div data-expected-height="25" style="-webkit-flex: 1 0 auto;"></div>
<div data-expected-height="25" style="-webkit-flex: 1 0 auto;"></div>
</div>
<div style="-webkit-flex: 1;"></div>
</div>
<div data-expected-width="500" style="-webkit-flex: 1 0 0; height:100px;"></div>
</div>
<div class="flexbox column" style="height: 100px">
<div class="row-reverse nested" style="-webkit-flex: 1; width: 100px;">
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
</div>
<div data-expected-height="50" style="-webkit-flex: 1 0 0;"></div>
</div>
<div class="flexbox column-reverse" style="height: 100px">
<div class="row-reverse nested" style="-webkit-flex: 1; width: 100px;">
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
</div>
<div data-expected-height="50" style="-webkit-flex: 1 0 0;"></div>
</div>
<div class="flexbox vertical-lr" style="height: 100px">
<div class="column nested" style="-webkit-flex: 1; width: 100px;">
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
<div data-expected-width="50" style="-webkit-flex: 1 0 auto;"></div>
</div>
<div data-expected-height="50" style="-webkit-flex: 1 0 0;"></div>
</div>
</body>
</html>