Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-023.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: grid indefinite size</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="match" href="contain-intrinsic-size-023-ref.html">
<meta name="assert" content="grid container is sized by intrinsic-size, with fr-tracks using that space">
<style>
#grid {
border: 3px solid black;
display: grid;
grid-template: 1fr 2fr / 3fr 4fr;
contain-intrinsic-size: 70px 80px;
contain: size;
width: max-content;
background: lightblue;
grid-gap: 5px;
}
.item {
background: lightgreen;
height: 100%;
}
</style>
<div id=grid>
<div class=item></div>
<div class=item></div>
<div class=item></div>
<div class=item></div>
</div>