Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: grid definite size</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="match" href="contain-intrinsic-size-022-ref.html">
<meta name="assert" content="grid container is sized by intrinsic-size, even if definite track sizes overflow">
<style>
#grid {
border: 3px solid black;
display: grid;
grid-template: 55px 66px / 77px 88px;
contain-intrinsic-size: 70px 80px;
contain: size;
width: max-content;
background: lightblue;
grid-gap: 5px;
}
.item {
background: lightgreen;
opacity: 0.5;
height: 100%;
}
</style>
<div id=grid>
<div class=item></div>
<div class=item></div>
<div class=item></div>
<div class=item></div>
</div>