concept

Intrinsic size placeholder — CSS reference

An intrinsic size placeholder reserves a predictable amount of space when the actual contents do not participate in size computation. The auto modifier permits using the last remembered size when applicable, with the specified length as fallback. This fixture tests a new contained element with no remembered size.

Formal Syntax & Structure

css syntaxcss
contain: size; contain-intrinsic-size: auto 100px;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>intrinsic-size-placeholder</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#box{display:inline-block;contain:size;contain-intrinsic-size:auto 100px}</style><body><section id="box"><div id="child" style="width:100px;height:60px">Content</div></section></body></html>
CSS Reference