Source code
Revision control
Copy as Markdown
Other Tools
<!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">
<style>
#grid {
border: 3px solid black;
display: grid;
grid-template: 55px 66px / 77px 88px;
box-sizing: content-box;
width: 70px;
height: 80px;
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>