concept

Intrinsic size interpolation — CSS reference

Intrinsic-size animation blends a numeric endpoint with an intrinsic size endpoint. The latter depends on content, so changing content may change the endpoint. A clipping wrapper can prevent transient overflow, but do not clip keyboard focus or hide important content.

Formal Syntax & Structure

css syntaxcss
interpolate-size: allow-keywords;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Intrinsic size interpolation</title><style>body{margin:16px;font:16px/1.5 system-ui;background:white;color:#172033} .demo{background:#dbeafe;box-sizing:border-box} button,select{font:inherit}#a{display:inline-block;interpolate-size:allow-keywords;width:80px}#a span{display:block;width:160px}</style><body><div id="a" class="demo"><span>Content</span></div></body></html>
CSS Reference