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