v149 · CSS · Shapes
Support rect() and xywh() in shape-outside
Chrome 149 brings rect() and xywh() to the shape-outside property. These rectangle-based basic shape functions were already supported in clip-path — now they work in shape-outside too, completing cross-property parity and aligning with Firefox and Safari.
concepts
-
Text Wrap Explorer
Live controls for
shape-outside: rect()andxywh()on a floated element. Adjust insets or position/size values and watch the paragraph reflow around the rectangular exclusion zone in real time. -
Shape Parity
Side-by-side demonstration showing the same
rect()/xywh()value applied to bothclip-pathandshape-outside. Confirms that both properties now accept identical syntax so one shape definition drives both the visual cutout and the text exclusion zone. -
rect() vs clip-path Parity
Interactive sliders for
rect()andxywh()applied simultaneously toshape-outsideandclip-pathside by side. Toggle between the two syntaxes, see the live CSS declaration, and verify the Chrome 149 cross-property parity. -
Syntax Converter
Convert between
rect(),xywh(), andinset()in real time. Edit any field and all three panels update immediately, with a live float preview so you can see how the text wraps around the resulting shape-outside region. -
inset() vs rect() vs xywh()
Three columns, one rectangle. Each syntax drives an independent float with identical coordinates. Adjust sliders to resize and reposition the shape and compare how the three declarations differ — including a reference table of parameter meanings and
autokeyword support. -
shape-margin with rect() and xywh()
shape-marginadds breathing room between therect()orxywh()shape boundary and the flowing text. Drag the margin and inset sliders to see the dashed margin boundary expand outward from the clipped shape — particularly useful whenclip-pathcuts the float to a smaller visual region and you want text to stand off from the visible edge.
why it shipped
The CSS basic shape functions are split across two main use sites: clip-path (visual clipping) and shape-outside (float exclusion). Before Chrome 149, rect() and xywh() were only accepted by clip-path — shape-outside recognised inset() for rectangles but not the newer, more readable syntax. A developer who wanted a rectangular float exclusion that matched a rectangular clip had to translate between two different syntaxes (xywh(10px 20px 100px 50px) vs the equivalent inset() expanded form). Chrome 149 adds rect() and xywh() to shape-outside, completing the parity that Firefox and Safari already had.
syntax quick reference
rect(top right bottom left)— insets from each edge of the reference box, likeinset()but edge-named. E.g.rect(10px 20px auto auto).xywh(x y width height)— origin + dimensions syntax. E.g.xywh(10px 20px 100px 50px)creates a 100×50 box at offset (10, 20).
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗