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.getElementsByClassName('item1')[0].style.justifySelf = 'start'; | 5 document.getElementsByClassName('item1')[0].style.justifySelf = 'left'; |
6 document.getElementsByClassName('item2')[0].style.justifySelf = 'end'; | 6 document.getElementsByClassName('item2')[0].style.justifySelf = 'right'; |
7 } | 7 } |
8 onload = runRepaintTest; | 8 onload = runRepaintTest; |
9 </script> | 9 </script> |
10 <style> | 10 <style> |
11 body { | 11 body { |
12 margin: 0; | 12 margin: 0; |
13 } | 13 } |
14 #container { | 14 #container { |
15 display: grid; | 15 display: grid; |
16 grid: 100px 100px / 150px 150px; | 16 grid: 100px 100px / 150px 150px; |
17 justify-items: center; | |
18 width: 200px; | 17 width: 200px; |
19 height: 300px; | 18 height: 300px; |
20 background-color: red; | 19 background-color: red; |
21 } | 20 } |
22 .item1 { | 21 .item1 { |
23 grid-row: 1; | 22 grid-row: 1; |
24 grid-column: 1; | 23 grid-column: 1; |
| 24 justify-self: start; |
25 background-color: green; | 25 background-color: green; |
26 border: solid thin blue; | |
27 width: 50px; | 26 width: 50px; |
28 } | 27 } |
29 .item2 { | 28 .item2 { |
30 grid-row: 1; | 29 grid-row: 1; |
31 grid-column: 2; | 30 grid-column: 2; |
| 31 justify-self: end; |
32 background-color: green; | 32 background-color: green; |
33 border: solid thin blue; | |
34 width: 50px; | 33 width: 50px; |
35 </style> | 34 </style> |
36 <p style="height: 20px">Tests invalidation on justify-self style change. Passes
if there is no red.</p> | 35 <p style="height: 20px">Tests invalidation on justify-self style change. Passes
if there is no red.</p> |
37 <div id="container"> | 36 <div id="container"> |
38 <div class="item1"> | 37 <div class="item1"> |
39 <div style="height: 150px"></div> | 38 <div style="height: 150px"></div> |
40 </div> | 39 </div> |
41 <div class="item2"> | 40 <div class="item2"> |
42 <div style="height: 100px"></div> | 41 <div style="height: 100px"></div> |
43 </div> | 42 </div> |
44 </div> | 43 </div> |
OLD | NEW |