property
shape-margin — CSS reference
Adds outward clearance to the float exclusion shape. Initial 0; not inherited. Percentages resolve against containing block inline size. Cannot expand exclusion beyond float margin box. Distinct from ordinary CSS margin.
Formal Syntax & Structure
css syntaxcss
<length-percentage [0,∞]>Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS masking and shapes lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{position:relative;margin:20px;width:80px;height:60px;background:red;box-sizing:content-box}#wrap{width:240px;font:16px/20px monospace} #a{float:left;position:static;margin:0;width:80px;height:80px;background:linear-gradient(to right,red 50%,transparent 50%)}#a{shape-outside:inset(0 40px 0 0);shape-margin:10px}</style><body><div id="wrap"><div id="a" aria-hidden="true"></div><span id="t">One two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty.</span></div></body></html>