Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 body { | |
| 4 position: relative; | |
| 5 width: 800px; | |
| 6 height: 600px; | |
| 7 } | |
| 8 | |
| 9 div { | |
| 10 background-color: grey; | |
| 11 } | |
| 12 | |
| 13 #container { | |
| 14 background-color: red; | |
| 15 position: absolute; | |
| 16 top: 0; | |
| 17 bottom: 0; | |
| 18 left: 0; | |
| 19 right: 0; | |
| 20 display: flex; | |
| 21 flex-direction: column; | |
| 22 } | |
| 23 | |
| 24 #top-bar { | |
| 25 background-color: green; | |
| 26 height: 20%; | |
| 27 } | |
| 28 | |
| 29 #content { | |
| 30 background-color: blue; | |
| 31 flex-basis: 100%; | |
| 32 } | |
| 33 </style> | |
| 34 | |
| 35 | |
| 36 <div id="container"> | |
| 37 <div id="top-bar"> | |
| 38 Tests that percentage heights get resolved correctly when the flexbox is | |
| 39 </div> | |
| 40 <div id="content"> | |
| 41 absolutely positioned without an explicit height. | |
| 42 </div> | |
| 43 </div> | |
| 44 | |
| 45 | |
| OLD | NEW |