OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <link href="resources/grid.css" rel="stylesheet"> | 2 <link href="resources/grid.css" rel="stylesheet"> |
3 <style> | 3 <style> |
4 .grid { | 4 .grid { |
5 grid: 100px 100px / 150px; | 5 grid: 150px / 100px 100px; |
6 width: 200px; | 6 width: 200px; |
7 position: relative; | 7 position: relative; |
8 } | 8 } |
9 .toStretch { align-self: end; } | 9 .toStretch { align-self: end; } |
10 .fromStretch { align-self: stretch; } | 10 .fromStretch { align-self: stretch; } |
11 </style> | 11 </style> |
12 <script src="../../resources/check-layout.js"></script> | 12 <script src="../../resources/check-layout.js"></script> |
13 <p>Tests how a align-self style change requires a relayout of the grid and previ
ously stretched items.</p> | 13 <p>Tests how a align-self style change requires a relayout of the grid and previ
ously stretched items.</p> |
14 <p>The grid bellow had initially 'align-self: end' and was changed to 'stretch'.
</p> | 14 <p>The grid bellow had initially 'align-self: end' and was changed to 'stretch'.
</p> |
15 <div class="grid"> | 15 <div class="grid"> |
(...skipping 14 matching lines...) Expand all Loading... |
30 </div> | 30 </div> |
31 </div> | 31 </div> |
32 <script> | 32 <script> |
33 document.body.offsetLeft; | 33 document.body.offsetLeft; |
34 document.getElementsByClassName('toStretch')[0].style.alignSelf = 'stretch'; | 34 document.getElementsByClassName('toStretch')[0].style.alignSelf = 'stretch'; |
35 document.getElementsByClassName('toStretch')[1].style.alignSelf = 'stretch'; | 35 document.getElementsByClassName('toStretch')[1].style.alignSelf = 'stretch'; |
36 document.getElementsByClassName('fromStretch')[0].style.alignSelf = 'center'; | 36 document.getElementsByClassName('fromStretch')[0].style.alignSelf = 'center'; |
37 document.getElementsByClassName('fromStretch')[1].style.alignSelf = 'center'; | 37 document.getElementsByClassName('fromStretch')[1].style.alignSelf = 'center'; |
38 checkLayout(".grid"); | 38 checkLayout(".grid"); |
39 </script> | 39 </script> |
OLD | NEW |