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