52 lines
1.1 KiB
HTML
52 lines
1.1 KiB
HTML
<!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: 100px 100px / 150px 150px;
|
|
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>
|