shape-image-threshold

Used with 'shape-outside', this property defines the alpha (transparency) limit that determines the shape. A threshold of 0.5 means pixels with more than 50% opacity will form part of the shape.

It is documented as part of the CSS Shapes specification.

/* Usage Example */
.image-wrap {
  float: left;
  shape-outside: url(';star.png');
  /* Only pixels with 80% opacity or more will be used for the wrap boundary */
  shape-image-threshold: 0.8;
}

/* Global values */
shape-image-threshold: inherit;
shape-image-threshold: initial;
shape-image-threshold: revert;
shape-image-threshold: revert-layer;
shape-image-threshold: unset;
Widely available Since 2020 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

37+
62+
10.1+
79+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC