| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <style> | 3 <style> |
| 4 .container { | 4 .container { |
| 5 position: relative; | 5 position: relative; |
| 6 background-color: pink; | 6 background-color: pink; |
| 7 outline: 1px solid red; | 7 outline: 1px solid red; |
| 8 display: inline-block; | 8 display: inline-block; |
| 9 } | 9 } |
| 10 .flexbox { | 10 .flexbox { |
| 11 display: -webkit-flex; | 11 display: flex; |
| 12 background-color: grey; | 12 background-color: grey; |
| 13 width: 100px; | 13 width: 100px; |
| 14 height: 100px; | 14 height: 100px; |
| 15 } | 15 } |
| 16 .title { | 16 .title { |
| 17 margin-top: 1em; | 17 margin-top: 1em; |
| 18 } | 18 } |
| 19 .ltr { | 19 .ltr { |
| 20 direction: ltr; | 20 direction: ltr; |
| 21 } | 21 } |
| 22 .rtl { | 22 .rtl { |
| 23 direction: rtl; | 23 direction: rtl; |
| 24 } | 24 } |
| 25 .horizontal-tb { | 25 .horizontal-tb { |
| 26 -webkit-writing-mode: horizontal-tb; | 26 -webkit-writing-mode: horizontal-tb; |
| 27 } | 27 } |
| 28 .horizontal-bt { | 28 .horizontal-bt { |
| 29 -webkit-writing-mode: horizontal-bt; | 29 -webkit-writing-mode: horizontal-bt; |
| 30 } | 30 } |
| 31 .vertical-rl { | 31 .vertical-rl { |
| 32 -webkit-writing-mode: vertical-rl; | 32 -webkit-writing-mode: vertical-rl; |
| 33 } | 33 } |
| 34 .vertical-lr { | 34 .vertical-lr { |
| 35 -webkit-writing-mode: vertical-lr; | 35 -webkit-writing-mode: vertical-lr; |
| 36 } | 36 } |
| 37 .row { | 37 .row { |
| 38 -webkit-flex-flow: row; | 38 flex-flow: row; |
| 39 } | 39 } |
| 40 .row-reverse { | 40 .row-reverse { |
| 41 -webkit-flex-flow: row-reverse; | 41 flex-flow: row-reverse; |
| 42 } | 42 } |
| 43 .column { | 43 .column { |
| 44 -webkit-flex-flow: column; | 44 flex-flow: column; |
| 45 } | 45 } |
| 46 .column-reverse { | 46 .column-reverse { |
| 47 -webkit-flex-flow: column-reverse; | 47 flex-flow: column-reverse; |
| 48 } | 48 } |
| 49 .physical { | 49 .physical { |
| 50 padding: 10px 20px 30px 40px; | 50 padding: 10px 20px 30px 40px; |
| 51 } | 51 } |
| 52 .physical > div { | 52 .physical > div { |
| 53 padding: 13px 2px 17px 8px; | 53 padding: 13px 2px 17px 8px; |
| 54 } | 54 } |
| 55 .logical { | 55 .logical { |
| 56 -webkit-padding-before: 10px; | 56 -webkit-padding-before: 10px; |
| 57 -webkit-padding-after: 30px; | 57 -webkit-padding-after: 30px; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 var expectations = (marginType == 'physical') ? physicalExpectat
ions : logicalExpectations; | 240 var expectations = (marginType == 'physical') ? physicalExpectat
ions : logicalExpectations; |
| 241 expectations = expectations[writingMode][direction]; | 241 expectations = expectations[writingMode][direction]; |
| 242 | 242 |
| 243 var container = document.createElement('div'); | 243 var container = document.createElement('div'); |
| 244 container.className = 'container'; | 244 container.className = 'container'; |
| 245 container.setAttribute('data-expected-width', expectations.conta
inersize[0]); | 245 container.setAttribute('data-expected-width', expectations.conta
inersize[0]); |
| 246 container.setAttribute('data-expected-height', expectations.cont
ainersize[1]); | 246 container.setAttribute('data-expected-height', expectations.cont
ainersize[1]); |
| 247 | 247 |
| 248 container.innerHTML = '\n<div class="flexbox ' + flexboxClassNam
e + '">\n' + | 248 container.innerHTML = '\n<div class="flexbox ' + flexboxClassNam
e + '">\n' + |
| 249 '<div style="-webkit-flex: 1 auto; width: 20px; height: 20px
;" ' + asString(expectations['flexitem' + flexFlow.replace('-reverse', '')]) + '
>\n' + | 249 '<div style="flex: 1 auto; width: 20px; height: 20px;" ' + a
sString(expectations['flexitem' + flexFlow.replace('-reverse', '')]) + '>\n' + |
| 250 '<div style="width:100%; height:100%" ' + asString(expec
tations['child' + flexFlow.replace('-reverse', '')]) + '></div>' + | 250 '<div style="width:100%; height:100%" ' + asString(expec
tations['child' + flexFlow.replace('-reverse', '')]) + '></div>' + |
| 251 '</div>\n' + | 251 '</div>\n' + |
| 252 '</div>\n'; | 252 '</div>\n'; |
| 253 | 253 |
| 254 document.body.appendChild(container); | 254 document.body.appendChild(container); |
| 255 }) | 255 }) |
| 256 }) | 256 }) |
| 257 }) | 257 }) |
| 258 }) | 258 }) |
| 259 </script> | 259 </script> |
| 260 </body> | 260 </body> |
| 261 </html> | 261 </html> |
| OLD | NEW |