Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <link href="resources/grid.css" rel="stylesheet"> | |
| 3 <style> | |
| 4 .grid { | |
| 5 grid: 100px 100px / 150px; | |
| 6 width: 200px; | |
|
svillar
2015/07/10 14:00:52
Do we really need width: here?
jfernandez
2015/07/10 15:07:24
See my comments above.
| |
| 7 position: relative; | |
| 8 } | |
| 9 .toStretch { align-self: end; } | |
| 10 .fromStretch { align-self: stretch; } | |
| 11 </style> | |
| 12 <script src="../../resources/check-layout.js"></script> | |
| 13 <p style="height: 20px">Tests how a align-self style change requires a relayout of the grid and previously stretched items.</p> | |
|
svillar
2015/07/10 14:00:52
Why height on <p> element?
jfernandez
2015/07/10 15:07:24
Done.
| |
| 14 <p>The grid bellow had initially 'align-self: end' and was changed to 'stretch'. </p> | |
| 15 <div class="grid"> | |
| 16 <div style="width: 50px;" class="toStretch firstRowFirstColumn" data-expecte d-height="150" data-offset-y="0"> | |
|
svillar
2015/07/10 14:00:52
Is it possible to set the width in its child as we
jfernandez
2015/07/10 15:07:24
See my comments above.
| |
| 17 <div style="height: 50px"></div> | |
| 18 </div> | |
| 19 <div style="width: 50px;" class="toStretch firstRowSecondColumn" data-expect ed-height="150" data-offset-y="0"> | |
| 20 <div style="height: 100px"></div> | |
| 21 </div> | |
| 22 </div> | |
| 23 <p>The grid bellow was initially stretched and it has now 'align-self: center'.< /p> | |
| 24 <div class="grid"> | |
| 25 <div style="width: 50px;" class="fromStretch firstRowFirstColumn" data-expec ted-height="50" data-offset-y="50"> | |
| 26 <div style="height: 50px"></div> | |
| 27 </div> | |
| 28 <div style="width: 50px;" class="fromStretch firstRowSecondColumn" data-expe cted-height="100" data-offset-y="25"> | |
| 29 <div style="height: 100px"></div> | |
| 30 </div> | |
| 31 </div> | |
| 32 <script> | |
| 33 document.body.offsetLeft; | |
| 34 document.getElementsByClassName('toStretch')[0].style.alignSelf = 'stretch'; | |
| 35 document.getElementsByClassName('toStretch')[1].style.alignSelf = 'stretch'; | |
| 36 document.getElementsByClassName('fromStretch')[0].style.alignSelf = 'center'; | |
| 37 document.getElementsByClassName('fromStretch')[1].style.alignSelf = 'center'; | |
| 38 checkLayout(".grid"); | |
| 39 </script> | |
| OLD | NEW |