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/grid-definition/grid-repeat-integer-004.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Grid: repeat() with flexible tracks</title>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Flexible tracks inside repeat() share the leftover space with each other and with tracks outside the repeat().">
<style>
.grid {
display: grid;
width: 100px;
height: 100px;
background: red;
grid-template-columns: repeat(2, 1fr) 50px;
grid-template-rows: repeat(2, 1fr);
}
.grid > div {
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div class="grid">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>