shape-image-threshold
Widely availableSince 202097% of users
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.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since January 2020. Widely available since July 2022.
The old way and the modern waySee the snippet: Wrap text around shapes without dummy floats →
Old way 7 lines
.avatar {
float: left;
width: 160px;
height: 160px;
border-radius: 50%;
}
/* looks round, wrap is still a rectangle */Modern 6 lines
.avatar {
float: left;
shape-outside: circle(50%);
shape-margin: 1rem;
}
/* wrap follows the circle, not the box */See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
0.0- Inherited
- No
- Applies to
- floats
- Animation type
- number
Quick 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;
}shape-image-threshold browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
37+
62+
10.1+
79+Mobile
37+Android
62+Android
10.3+iOS