Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-1977" />
<meta name="assert" content="Grid has a definite block size computed using the inline size/aspect ratio and item is aligned accordingly (centered vertically).">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
<style>
.grid {
display: grid;
aspect-ratio: 1/1;
align-items: center;
background: linear-gradient(to bottom, green 0, green 25px, red 25px, red 75px, green 75px, green 100px);
}
.item {
width: 100px;
height: 50px;
background-color: green;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width: 100px">
<div class="grid">
<div class="item"></div>
</div>
</div>
</body>
</html>