CKTIS / CSS
shape-image-threshold — alpha threshold for a wrapping shape
shape-image-threshold selects image pixels used to determine the area around a float that surrounding text avoids.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
shape-image-threshold: <opacity-value>;shape-image-threshold works with an image in shape-outside: the shape encloses pixels with alpha strictly greater than the threshold. It neither clips nor changes the visible image; it does not control a circle() shape.
The initial value is 0; the property is not inherited. Numbers outside [0,1] are clamped to its bounds. At 1, the shape is empty because no pixel has a greater alpha value.
The example uses a gradient without external resources. The 0.5 threshold selects its opaque left half.
Examples
<!doctype html>
<meta charset="utf-8">
<title>shape-image-threshold</title>
<style>
.demo { width: 320px; display: flow-root; font: 16px/24px monospace; }
.shape {
float: left;
width: 160px;
height: 120px;
shape-outside: linear-gradient(to right, #000 80px, transparent 80px);
shape-image-threshold: 0.5;
}
p { margin: 0; }
</style>
<div class="demo">
<div class="shape" aria-hidden="true"></div>
<p>Alpha defines the wrapping area. Alpha defines the wrapping area. Alpha defines the wrapping area. Alpha defines the wrapping area. Alpha defines the wrapping area.</p>
</div>Result
Expected: text beside the float starts 80px from the container's left edge, rather than 160px. With shape-image-threshold: 1, the shape is empty and text starts at the left edge.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.