| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 #column { | 3 #column { |
| 4 display: -webkit-flex; | 4 display: flex; |
| 5 flex-direction: column; | 5 flex-direction: column; |
| 6 border: 5px solid yellow; | 6 border: 5px solid yellow; |
| 7 } | 7 } |
| 8 | 8 |
| 9 #row { | 9 #row { |
| 10 display: -webkit-flex; | 10 display: flex; |
| 11 flex-direction: row; | 11 flex-direction: row; |
| 12 border: 5px solid blue; | 12 border: 5px solid blue; |
| 13 } | 13 } |
| 14 | 14 |
| 15 .item { | 15 .item { |
| 16 border: 5px solid green; | 16 border: 5px solid green; |
| 17 } | 17 } |
| 18 </style> | 18 </style> |
| 19 <body> | 19 <body> |
| 20 <div id="column"> | 20 <div id="column"> |
| 21 <div id="row"> | 21 <div id="row"> |
| 22 <div class="item">This text should not overflow its box</div> | 22 <div class="item">This text should not overflow its box</div> |
| 23 </div> | 23 </div> |
| 24 </div> | 24 </div> |
| 25 <script> | 25 <script> |
| 26 var columnBox = document.getElementById("column"); | 26 var columnBox = document.getElementById("column"); |
| 27 columnBox.offsetHeight; | 27 columnBox.offsetHeight; |
| 28 columnBox.style.width = "200px"; | 28 columnBox.style.width = "200px"; |
| 29 </script> | 29 </script> |
| OLD | NEW |