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 need width: here?
jfernandez
2015/07/10 15:07:24
It's just to make grid container fit grid tracks s
| |
7 position: relative; | |
8 } | |
9 #fromStretch { align-items: stretch; } | |
10 #toStretch { align-items: end; } | |
11 </style> | |
12 <script src="../../resources/check-layout.js"></script> | |
13 <p style="height: 20px">Tests how a align-items style change requires a relayout of the grid and previously stretched items.</p> | |
14 <p>The grid bellow had initially 'align-items: end' and was changed to 'stretch' .</p> | |
svillar
2015/07/10 14:00:52
Why height on <p> element?
jfernandez
2015/07/10 15:07:24
A mistake, I will remove it.
| |
15 <div id="toStretch" class="grid"> | |
16 <div style="width: 50px;" class="firstRowFirstColumn" data-expected-height=" 150" data-offset-y="0"> | |
svillar
2015/07/10 14:00:52
Can we set width on its child the same we do for h
jfernandez
2015/07/10 15:07:24
It won't affect the test, definitively, because we
| |
17 <div style="height: 50px"></div> | |
18 </div> | |
19 <div style="width: 50px;" class="firstRowSecondColumn" data-expected-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-items: center'. </p> | |
24 <div id="fromStretch" class="grid"> | |
25 <div style="width: 50px;" class="firstRowFirstColumn" data-expected-height=" 50" data-offset-y="50"> | |
26 <div style="height: 50px"></div> | |
27 </div> | |
28 <div style="width: 50px;" class="firstRowSecondColumn" data-expected-height= "100" data-offset-y="25"> | |
29 <div style="height: 100px"></div> | |
30 </div> | |
31 </div> | |
32 <script> | |
33 document.body.offsetLeft; | |
34 document.getElementById("toStretch").style.alignItems = "stretch"; | |
35 document.getElementById("fromStretch").style.alignItems = "center"; | |
36 checkLayout(".grid"); | |
37 </script> | |
OLD | NEW |