<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: div with max-content parent</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-002-ref.html">
<meta name="assert" content="contain-intrinsic-size is used to size the div, with parent's max-content width respecting it">
<style>
#border {
width: max-content;
border: 1px solid black;
}
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
}
</style>
<div id=border>
<div id=target></div>
</div>