shape-outside
Widely availableSince 202097% of users
The core property for CSS Shapes. It allows text to wrap around complex paths (like circles, polygons or transparent images) instead of just being limited to rectangular boxes.
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
none- Inherited
- No
- Applies to
- floats
- Animation type
- basicShapeOtherwiseNo
Quick example
.circular-image {
float: left;
width: 200px;
height: 200px;
/* Text will flow in a curve around this circle instead of a straight line */
shape-outside: circle(50%);
}Values
noneRelated snippet
Wrap text around shapes without dummy floatsLayout →shape-outside 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