Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/masonry/tentative/abspos/row-masonry-positioned-item-dynamic-change.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Masonry Layout Test: Masonry positioned item dynamic change.</title>
<link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
<link rel="match" href="../../../../reference/ref-filled-green-100px-square-only.html">
<style>
.masonry {
display: masonry;
masonry-direction: row;
grid-template-rows: 75px 25px;
position: relative;
width: 100px;
}
.absolute {
background: green;
position: absolute;
grid-row: 1 / 2;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
</style>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="masonry">
<div style="background: green; height: 100%; width: 100%"></div>
<div style="background: red; height: 100%; width: 100%"></div>
<div id="target" class="absolute"></div>
</div>
<script>
document.body.offsetLeft;
document.getElementById('target').style.gridRow = '2 / 3';
</script>
</body>
</html>