summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/justify-items-legacy-change.html
blob: 5637a5171d63d7c329d43b0d8a512b319e29fc7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE HTML>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest() {
  document.getElementById('parentContainer').style.justifyItems = 'legacy center';
}
onload = runRepaintTest;
</script>
<style>
body {
  margin: 0;
}
#parentContainer {
  justify-items: center;
  background-color: orange;
  width: 300px;
  height: 400px;
}

#container {
  display: grid;
  grid: 150px 150px / 100px 100px;
  width: 200px;
  height: 300px;
  background-color: red;
}
.item1 {
  grid-row: 1;
  grid-column: 1;
  background-color: green;
  border: solid thin blue;
  width: 50px;
}
.item2 {
  grid-row: 1;
  grid-column: 2;
  background-color: green;
  border: solid thin blue;
  width: 50px;
</style>
<p style="height: 20px">Tests invalidation on justify-items style change (legacy value). Passes if green bars are centerd inside their red container.</p>
<div id="parentContainer">
    <div id="container">
        <div class="item1">
            <div style="height: 50px"></div>
        </div>
        <div class="item2">
            <div style="height: 50px"></div>
        </div>
    </div>
</div>