| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <link href="resources/flexbox.css" rel="stylesheet"> | 3 <link href="resources/flexbox.css" rel="stylesheet"> |
| 4 <style> | 4 <style> |
| 5 body { | 5 body { |
| 6 margin: 0; | 6 margin: 0; |
| 7 } | 7 } |
| 8 .flexbox { | 8 .flexbox { |
| 9 width: 600px; | 9 width: 600px; |
| 10 } | 10 } |
| 11 .flexbox div { | 11 .flexbox div { |
| 12 height: 20px; | 12 height: 20px; |
| 13 border: 0; | 13 border: 0; |
| 14 } | 14 } |
| 15 | 15 |
| 16 .flexbox :nth-child(1) { | 16 .flexbox :nth-child(1) { |
| 17 background-color: blue; | 17 background-color: blue; |
| 18 } | 18 } |
| 19 .flexbox :nth-child(2) { | 19 .flexbox :nth-child(2) { |
| 20 background-color: green; | 20 background-color: green; |
| 21 } | 21 } |
| 22 .flexbox :nth-child(3) { | 22 .flexbox :nth-child(3) { |
| 23 background-color: red; | 23 background-color: red; |
| 24 } | 24 } |
| 25 | 25 |
| 26 .flex1 { | 26 .flex1 { |
| 27 -webkit-flex: 1; | 27 flex: 1; |
| 28 -moz-flex: 1; | |
| 29 } | 28 } |
| 30 .flex2 { | 29 .flex2 { |
| 31 -webkit-flex: 2; | 30 flex: 2; |
| 32 -moz-flex: 2; | |
| 33 } | 31 } |
| 34 .flex3 { | 32 .flex3 { |
| 35 -webkit-flex: 3; | 33 flex: 3; |
| 36 -moz-flex: 3; | |
| 37 } | 34 } |
| 38 .flex1-0-0 { | 35 .flex1-0-0 { |
| 39 -webkit-flex: 1 0 0px; | 36 flex: 1 0 0px; |
| 40 -moz-flex: 1 0 0px; | |
| 41 } | 37 } |
| 42 </style> | 38 </style> |
| 43 <script src="../../resources/check-layout.js"></script> | 39 <script src="../../resources/check-layout.js"></script> |
| 44 <body onload="checkLayout('.flexbox')"> | 40 <body onload="checkLayout('.flexbox')"> |
| 45 | 41 |
| 46 <div class="flexbox"> | 42 <div class="flexbox"> |
| 47 <div data-expected-width="200" class="flex1"></div> | 43 <div data-expected-width="200" class="flex1"></div> |
| 48 <div data-expected-width="200" class="flex1"></div> | 44 <div data-expected-width="200" class="flex1"></div> |
| 49 <div data-expected-width="200" class="flex1"></div> | 45 <div data-expected-width="200" class="flex1"></div> |
| 50 </div> | 46 </div> |
| 51 | 47 |
| 52 <div class="flexbox"> | 48 <div class="flexbox"> |
| 53 <div data-expected-width="200" style="-webkit-flex: .5; -moz-flex: .5"></div> | 49 <div data-expected-width="200" style="flex: .5;"></div> |
| 54 <div data-expected-width="200" style="-webkit-flex: .5; -moz-flex: .5"></div> | 50 <div data-expected-width="200" style="flex: .5;"></div> |
| 55 <div data-expected-width="200" style="-webkit-flex: .5; -moz-flex: .5"></div> | 51 <div data-expected-width="200" style="flex: .5;"></div> |
| 56 </div> | 52 </div> |
| 57 | 53 |
| 58 <div class="flexbox"> | 54 <div class="flexbox"> |
| 59 <div data-expected-width="300" class="flex3"></div> | 55 <div data-expected-width="300" class="flex3"></div> |
| 60 <div data-expected-width="200" class="flex2"></div> | 56 <div data-expected-width="200" class="flex2"></div> |
| 61 <div data-expected-width="100" class="flex1"></div> | 57 <div data-expected-width="100" class="flex1"></div> |
| 62 </div> | 58 </div> |
| 63 | 59 |
| 64 <div class="flexbox"> | 60 <div class="flexbox"> |
| 65 <div data-expected-width="250" class="flex1"></div> | 61 <div data-expected-width="250" class="flex1"></div> |
| 66 <div data-expected-width="250" class="flex1"></div> | 62 <div data-expected-width="250" class="flex1"></div> |
| 67 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> | 63 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> |
| 68 </div> | 64 </div> |
| 69 | 65 |
| 70 <div class="flexbox"> | 66 <div class="flexbox"> |
| 71 <div data-expected-width="150" class="flex1"></div> | 67 <div data-expected-width="150" class="flex1"></div> |
| 72 <div data-expected-width="150" class="flex1"></div> | 68 <div data-expected-width="150" class="flex1"></div> |
| 73 <div data-expected-width="300" class="flex-none" style="width: 50%"></div> | 69 <div data-expected-width="300" class="flex-none" style="width: 50%"></div> |
| 74 </div> | 70 </div> |
| 75 | 71 |
| 76 <!-- The first two boxes should fill the extra 300px evenly (each gets 150px ext
ra). --> | 72 <!-- The first two boxes should fill the extra 300px evenly (each gets 150px ext
ra). --> |
| 77 <div class="flexbox"> | 73 <div class="flexbox"> |
| 78 <div data-expected-width="150" class="flex1"></div> | 74 <div data-expected-width="150" class="flex1"></div> |
| 79 <div data-expected-width="350" style="-webkit-flex: 1 200px; -moz-flex: 1 200p
x"></div> | 75 <div data-expected-width="350" style="flex: 1 200px;"></div> |
| 80 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> | 76 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> |
| 81 </div> | 77 </div> |
| 82 | 78 |
| 83 <!-- Like the last test, except the middle box gets more space than the first bo
x. --> | 79 <!-- Like the last test, except the middle box gets more space than the first bo
x. --> |
| 84 <div class="flexbox"> | 80 <div class="flexbox"> |
| 85 <div data-expected-width="100" class="flex1"></div> | 81 <div data-expected-width="100" class="flex1"></div> |
| 86 <div data-expected-width="400" style="-webkit-flex: 2 33.333333%; -moz-flex: 2
33.333333%"></div> | 82 <div data-expected-width="400" style="flex: 2 33.333333%;"></div> |
| 87 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> | 83 <div data-expected-width="100" class="flex-none" style="width: 100px"></div> |
| 88 </div> | 84 </div> |
| 89 | 85 |
| 90 <!-- Test some negative flexing. --> | 86 <!-- Test some negative flexing. --> |
| 91 <div class="flexbox"> | 87 <div class="flexbox"> |
| 92 <div data-expected-width="200" style="-webkit-flex: 1 1 300px; -moz-flex: 1 1
300px"></div> | 88 <div data-expected-width="200" style="flex: 1 1 300px;"></div> |
| 93 <div data-expected-width="200" style="-webkit-flex: 2 1 300px; -moz-flex: 2 1
300px"></div> | 89 <div data-expected-width="200" style="flex: 2 1 300px;"></div> |
| 94 <div data-expected-width="200" style="-webkit-flex: 3 1 300px; -moz-flex: 3 1
300px"></div> | 90 <div data-expected-width="200" style="flex: 3 1 300px;"></div> |
| 95 </div> | 91 </div> |
| 96 | 92 |
| 97 <div class="flexbox"> | 93 <div class="flexbox"> |
| 98 <div data-expected-width="250" style="-webkit-flex: 1 1 300px; -moz-flex: 1 1
300px"></div> | 94 <div data-expected-width="250" style="flex: 1 1 300px;"></div> |
| 99 <div data-expected-width="150" style="-webkit-flex: 2 3 300px; -moz-flex: 2 3
300px"></div> | 95 <div data-expected-width="150" style="flex: 2 3 300px;"></div> |
| 100 <div data-expected-width="200" class="flex-none" style="width: 200px"></div> | 96 <div data-expected-width="200" class="flex-none" style="width: 200px"></div> |
| 101 </div> | 97 </div> |
| 102 | 98 |
| 103 <div class="flexbox"> | 99 <div class="flexbox"> |
| 104 <div data-expected-width="50" style="-webkit-flex: 1 1 100px; -moz-flex: 1 1 1
00px"></div> | 100 <div data-expected-width="50" style="flex: 1 1 100px;"></div> |
| 105 <div data-expected-width="250" style="-webkit-flex: 1 1 500px; -moz-flex: 1 1
500px"></div> | 101 <div data-expected-width="250" style="flex: 1 1 500px;"></div> |
| 106 <div data-expected-width="300" class="flex-none" style="width: 300px"></div> | 102 <div data-expected-width="300" class="flex-none" style="width: 300px"></div> |
| 107 </div> | 103 </div> |
| 108 | 104 |
| 109 <div class="flexbox"> | 105 <div class="flexbox"> |
| 110 <div data-expected-width="50" style="-webkit-flex: 1 1 100px; -moz-flex: 1 1 1
00px"></div> | 106 <div data-expected-width="50" style="flex: 1 1 100px;"></div> |
| 111 <div data-expected-width="250" style="-webkit-flex: 1 1 500px; -moz-flex: 1 1
500px; margin-right: 300px;"></div> | 107 <div data-expected-width="250" style="flex: 1 1 500px; margin-right: 300px;"><
/div> |
| 112 </div> | 108 </div> |
| 113 | 109 |
| 114 <div class="flexbox"> | 110 <div class="flexbox"> |
| 115 <div data-expected-width="50" style="-webkit-flex: 1 1 100px; -moz-flex: 1 1 1
00px"></div> | 111 <div data-expected-width="50" style="flex: 1 1 100px;"></div> |
| 116 <div data-expected-width="550" style="-webkit-flex: 1 1 500px; -moz-flex: 1 1
500px; padding-left: 300px;"></div> | 112 <div data-expected-width="550" style="flex: 1 1 500px; padding-left: 300px;"><
/div> |
| 117 </div> | 113 </div> |
| 118 | 114 |
| 119 <div class="flexbox"> | 115 <div class="flexbox"> |
| 120 <div data-expected-width="50" style="-webkit-flex: 1 1 100px; -moz-flex: 1 1 1
00px"></div> | 116 <div data-expected-width="50" style="flex: 1 1 100px;"></div> |
| 121 <div data-expected-width="550" style="-webkit-flex: 1 1 500px; -moz-flex: 1 1
500px; border-left: 200px dashed orange; border-right: 100px dashed orange;"></d
iv> | 117 <div data-expected-width="550" style="flex: 1 1 500px; border-left: 200px dash
ed orange; border-right: 100px dashed orange;"></div> |
| 122 </div> | 118 </div> |
| 123 | 119 |
| 124 <!-- Test some overflow cases. --> | 120 <!-- Test some overflow cases. --> |
| 125 <div class="flexbox"> | 121 <div class="flexbox"> |
| 126 <div data-expected-width="600" style="-webkit-flex: 0 100000000000000000000000
000000000000000 600px; -moz-flex: 0 100000000000000000000000000000000000000 600p
x"></div> | 122 <div data-expected-width="600" style="flex: 0 10000000000000000000000000000000
0000000 600px;"></div> |
| 127 <div data-expected-width="600" style="-webkit-flex: 0 100000000000000000000000
000000000000000 600px; -moz-flex: 0 100000000000000000000000000000000000000 600p
x"></div> | 123 <div data-expected-width="600" style="flex: 0 10000000000000000000000000000000
0000000 600px;"></div> |
| 128 </div> | 124 </div> |
| 129 | 125 |
| 130 <div class="flexbox"> | 126 <div class="flexbox"> |
| 131 <div data-expected-width="600" style="-webkit-flex: 10000000000000000000000000
0000000000000 0 600px; -moz-flex: 100000000000000000000000000000000000000 0 600p
x"></div> | 127 <div data-expected-width="600" style="flex: 1000000000000000000000000000000000
00000 0 600px;"></div> |
| 132 <div data-expected-width="600" style="-webkit-flex: 0 100000000000000000000000
000000000000000 600px; -moz-flex: 0 100000000000000000000000000000000000000 600p
x"></div> | 128 <div data-expected-width="600" style="flex: 0 10000000000000000000000000000000
0000000 600px;"></div> |
| 133 <div data-expected-width="33554428" style="-webkit-flex: 1 1 10000000000000000
0000000000000000000000px; -moz-flex: 1 1 100000000000000000000000000000000000000
px"></div> | 129 <div data-expected-width="33554428" style="flex: 1 1 1000000000000000000000000
00000000000000px;"></div> |
| 134 </div> | 130 </div> |
| 135 | 131 |
| 136 <!-- Test flexitem borders. --> | 132 <!-- Test flexitem borders. --> |
| 137 <div class="flexbox"> | 133 <div class="flexbox"> |
| 138 <div data-expected-width="250" class="flex1" style="border-left: 150px solid b
lack"></div> | 134 <div data-expected-width="250" class="flex1" style="border-left: 150px solid b
lack"></div> |
| 139 <div data-expected-width="250" class="flex1-0-0" style="border-right: 150px so
lid orange"></div> | 135 <div data-expected-width="250" class="flex1-0-0" style="border-right: 150px so
lid orange"></div> |
| 140 <div data-expected-width="100" class="flex1-0-0"></div> | 136 <div data-expected-width="100" class="flex1-0-0"></div> |
| 141 </div> | 137 </div> |
| 142 | 138 |
| 143 <div class="flexbox"> | 139 <div class="flexbox"> |
| 144 <div data-expected-width="300" style="width: 100px; border: 100px solid black;
-webkit-flex: none;"></div> | 140 <div data-expected-width="300" style="width: 100px; border: 100px solid black;
flex: none;"></div> |
| 145 <div data-expected-width="200" class="flex2"></div> | 141 <div data-expected-width="200" class="flex2"></div> |
| 146 <div data-expected-width="100" class="flex1"></div> | 142 <div data-expected-width="100" class="flex1"></div> |
| 147 </div> | 143 </div> |
| 148 | 144 |
| 149 <!-- Test flexitem padding. --> | 145 <!-- Test flexitem padding. --> |
| 150 <div class="flexbox"> | 146 <div class="flexbox"> |
| 151 <div data-expected-width="250" class="flex1" style="padding-left: 150px"></div
> | 147 <div data-expected-width="250" class="flex1" style="padding-left: 150px"></div
> |
| 152 <div data-expected-width="250" class="flex1-0-0" style="padding-right: 150px">
</div> | 148 <div data-expected-width="250" class="flex1-0-0" style="padding-right: 150px">
</div> |
| 153 <div data-expected-width="100" class="flex1-0-0"></div> | 149 <div data-expected-width="100" class="flex1-0-0"></div> |
| 154 </div> | 150 </div> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 <div class="flexbox"> | 187 <div class="flexbox"> |
| 192 <div data-expected-width="200" class="flex-auto"> | 188 <div data-expected-width="200" class="flex-auto"> |
| 193 <div style="width: 100px;"></div> | 189 <div style="width: 100px;"></div> |
| 194 </div> | 190 </div> |
| 195 <div data-expected-width="100" class="flex-auto"></div> | 191 <div data-expected-width="100" class="flex-auto"></div> |
| 196 <div data-expected-width="300" class="flex-auto"> | 192 <div data-expected-width="300" class="flex-auto"> |
| 197 <div style="width: 200px;"></div> | 193 <div style="width: 200px;"></div> |
| 198 </div> | 194 </div> |
| 199 </div> | 195 </div> |
| 200 | 196 |
| 201 <div class="flexbox" style="height: 60px; -webkit-flex-flow: row wrap; position:
relative;"> | 197 <div class="flexbox" style="height: 60px; flex-flow: row wrap; position: relativ
e;"> |
| 202 <div data-offset-x="0" data-offset-y="0" style="position: absolute;"></div> | 198 <div data-offset-x="0" data-offset-y="0" style="position: absolute;"></div> |
| 203 <div data-offset-x="0" data-offset-y="0" style="width: 700px;"></div> | 199 <div data-offset-x="0" data-offset-y="0" style="width: 700px;"></div> |
| 204 </div> | 200 </div> |
| 205 | 201 |
| 206 <!-- Test border/padding/margin on the flexbox itself. --> | 202 <!-- Test border/padding/margin on the flexbox itself. --> |
| 207 <div data-expected-width="830" style="border: 10px solid; display: inline-block;
"> | 203 <div data-expected-width="830" style="border: 10px solid; display: inline-block;
"> |
| 208 <div data-expected-width="700" style="padding-left: 10px; padding-right: 20p
x; border-left: 30px solid; border-right: 40px solid; margin-left: 50px; margin-
right:60px;" class="flexbox"> | 204 <div data-expected-width="700" style="padding-left: 10px; padding-right: 20p
x; border-left: 30px solid; border-right: 40px solid; margin-left: 50px; margin-
right:60px;" class="flexbox"> |
| 209 <div data-offset-x="100" data-expected-width="200" class="flex1"></div> | 205 <div data-offset-x="100" data-expected-width="200" class="flex1"></div> |
| 210 <div data-offset-x="300" data-expected-width="200" class="flex1"></div> | 206 <div data-offset-x="300" data-expected-width="200" class="flex1"></div> |
| 211 <div data-offset-x="500" data-expected-width="200" class="flex1"></div> | 207 <div data-offset-x="500" data-expected-width="200" class="flex1"></div> |
| 212 </div> | 208 </div> |
| 213 </div> | 209 </div> |
| 214 | 210 |
| 215 </body> | 211 </body> |
| 216 </html> | 212 </html> |
| OLD | NEW |