OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <script src="resources/text-based-repaint.js"></script> | 2 <script src="resources/text-based-repaint.js"></script> |
3 <script> | 3 <script> |
4 function repaintTest() { | 4 function repaintTest() { |
5 document.getElementById('parentContainer').style.justifyItems = 'legacy center
'; | 5 document.getElementById('parentContainer').style.justifyItems = 'legacy center
'; |
6 } | 6 } |
7 onload = runRepaintTest; | 7 onload = runRepaintTest; |
8 </script> | 8 </script> |
9 <style> | 9 <style> |
10 body { | 10 body { |
11 margin: 0; | 11 margin: 0; |
12 } | 12 } |
13 #parentContainer { | 13 #parentContainer { |
14 justify-items: center; | 14 justify-items: center; |
15 background-color: orange; | 15 background-color: orange; |
16 width: 300px; | 16 width: 300px; |
17 height: 400px; | 17 height: 400px; |
18 } | 18 } |
19 | 19 |
20 #container { | 20 #container { |
21 display: grid; | 21 display: grid; |
22 grid: 100px 100px / 150px 150px; | 22 grid: 150px 150px / 100px 100px; |
23 width: 200px; | 23 width: 200px; |
24 height: 300px; | 24 height: 300px; |
25 background-color: red; | 25 background-color: red; |
26 } | 26 } |
27 .item1 { | 27 .item1 { |
28 grid-row: 1; | 28 grid-row: 1; |
29 grid-column: 1; | 29 grid-column: 1; |
30 background-color: green; | 30 background-color: green; |
31 border: solid thin blue; | 31 border: solid thin blue; |
32 width: 50px; | 32 width: 50px; |
33 } | 33 } |
34 .item2 { | 34 .item2 { |
35 grid-row: 1; | 35 grid-row: 1; |
36 grid-column: 2; | 36 grid-column: 2; |
37 background-color: green; | 37 background-color: green; |
38 border: solid thin blue; | 38 border: solid thin blue; |
39 width: 50px; | 39 width: 50px; |
40 </style> | 40 </style> |
41 <p style="height: 20px">Tests invalidation on justify-items style change (legacy
value). Passes if green bars are centerd inside their red container.</p> | 41 <p style="height: 20px">Tests invalidation on justify-items style change (legacy
value). Passes if green bars are centerd inside their red container.</p> |
42 <div id="parentContainer"> | 42 <div id="parentContainer"> |
43 <div id="container"> | 43 <div id="container"> |
44 <div class="item1"> | 44 <div class="item1"> |
45 <div style="height: 50px"></div> | 45 <div style="height: 50px"></div> |
46 </div> | 46 </div> |
47 <div class="item2"> | 47 <div class="item2"> |
48 <div style="height: 50px"></div> | 48 <div style="height: 50px"></div> |
49 </div> | 49 </div> |
50 </div> | 50 </div> |
51 </div> | 51 </div> |
OLD | NEW |