OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML> | |
2 <link href="resources/grid.css" rel="stylesheet"> | |
3 <script src="../../resources/check-layout.js"></script> | |
4 <style> | |
5 .grid { | |
6 grid-template: 200px 200px / 200px 200px; | |
7 width: -webkit-fit-content; | |
8 position: relative; | |
9 } | |
10 #fromFixedHeight { height: 100px; } | |
11 #fromMarginAuto { margin: auto; } | |
12 </style> | |
13 <p>The grids below had initially 'stretched' items, but we have changed 'height'
and 'margin' to values which don't allow stretch. This test verifies that the l
ayout algorithm properly detects such changes and clear the override height acco
rdingly.</p> | |
14 <div class="grid"> | |
15 <div id="toFixedHeight" class="firstRowFirstColumn" data-expected-height="10
0"></div> | |
16 <div class="firstRowSecondColumn" data-expected-height="200"></div> | |
17 <div class="secondRowFirstColumn" data-expected-height="200"></div> | |
18 <div id="fromFixedHeight" class="secondRowSecondColumn" data-expected-height
="200"></div> | |
19 </div> | |
20 <div class="grid"> | |
21 <div id="toMarginAuto" class="firstRowFirstColumn" data-expected-height="100
"> | |
22 <div style="height: 100px"></div> | |
23 </div> | |
24 <div class="firstRowSecondColumn" data-expected-height="200"></div> | |
25 <div class="secondRowFirstColumn" data-expected-height="200"></div> | |
26 <div id="fromMarginAuto" class="secondRowSecondColumn" data-expected-height=
"200"> | |
27 <div style="height: 100px"></div> | |
28 </div> | |
29 </div> | |
30 <script> | |
31 document.body.offsetLeft; | |
32 document.getElementById("fromFixedHeight").style.height = "auto"; | |
33 document.getElementById("toFixedHeight").style.height = "100px"; | |
34 document.getElementById("fromMarginAuto").style.margin = "0"; | |
35 document.getElementById("toMarginAuto").style.margin = "auto"; | |
36 checkLayout(".grid"); | |
37 </script> | |
OLD | NEW |