v147 · css · shipped
CSS border-shape
Define the geometry of an element's border using any CSS basic shape — polygon, circle, ellipse, shape() paths. Unlike clip-path which hides content, border-shape strokes the shape as a border and clips only the element's interior, leaving the exterior visible.
at a glance
| Shipped in | Chrome 147 (desktop + Android) |
|---|---|
| Status | Enabled by default |
| Flag | None |
| Standards position | Proposed in CSS Borders and Box Decorations Level 4 (W3C CSSWG) |
| Spec | CSS Borders and Box Decorations Level 4 — border-shape |
| ChromeStatus | 5459864205393920 — CSS border-shape (API record) |
| Explainer | border-shape explainer (noamr/explainers) |
why it exists
Non-rectangular UI elements — tooltips with arrow tails, hexagonal avatars, chevron breadcrumbs, scalloped cards, speech bubbles — have always required SVG, hacks with pseudo-elements, or clip-path which removes hit-testing outside the clip region. border-shape gives a single CSS property that strokes any arbitrary shape as the element's border, clips the interior so backgrounds and children are contained, and still lets the rectangular box model govern layout.
Syntax
Value definition from the CSS Borders and Box Decorations Level 4 editor’s draft propdef table, quoted verbatim as fetched on 2026-08-02:
border-shape: none | [ <basic-shape> <geometry-box>? ]{1,2}
The draft is still moving: Chrome 147 shipped the two-shape form with a / separator (as documented in the shipped-syntax table and examples below, and in Una Kravets’s launch article — the ChromeStatus record’s sample link), while the current draft grammar shows a space-separated {1,2} repetition with an optional <geometry-box> per shape. Where they disagree, test in the browser and expect the implementation to converge on the spec over time.
The shipped property (Chrome 147)
| Property | border-shape |
|---|---|
| Initial value | none |
| Applies to | All elements that accept border properties |
| Inherited | No |
| Formal syntax | none | <basic-shape> [ / <basic-shape> ]? |
| Incompatible with | border-radius and corner-shape are ignored when border-shape is set to a non-none value |
Accepted shape functions
| Function | Description |
|---|---|
none | Default — uses normal rectangular border rendering |
circle() | A circle fitted to the element's border box |
ellipse() | An ellipse; radii can be lengths, percentages, or closest-side / farthest-side |
polygon(x y, …) | A closed polygon defined by a list of coordinate pairs |
inset(…) | A rectangle, optionally with rounded corners via round |
shape(…) | SVG-like path grammar: from, line to, curve to, arc, close |
<shape1> / <shape2> | Two-path variant: fills the region between the two shapes — useful for cut-out frames |
rect() · xywh() · path() | Also members of the <basic-shape> production (CSS Shapes) that the grammar accepts; not separately exercised in the launch article — feature-detect each with @supports (border-shape: …) before relying on it |
Examples
Feature-detect before relying on the property — it is Chromium-only (Chrome and Edge; see the compatibility table):
@supports (border-shape: circle()) {
.avatar { border-shape: circle(); }
}
border-shape in Chrome 147+.
Pentagon border
.badge {
width: 80px;
height: 80px;
border: 3px solid steelblue;
background: aliceblue;
border-shape: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}
Circle border
.avatar {
width: 64px;
height: 64px;
border: 2px solid navy;
border-shape: circle();
}
Tooltip with arrow (shape() path)
.tooltip {
border: 2px solid #333;
background: white;
padding: 8px 12px;
/* Rounded rectangle with downward arrow at the bottom-centre */
border-shape: shape(
from 12px 0,
line to calc(100% - 12px) 0,
arc to 100% 12px of 12px,
line to 100% calc(100% - 20px),
arc to calc(100% - 12px) calc(100% - 8px) of 12px,
line to calc(50% + 10px) calc(100% - 8px),
line to 50% 100%, /* arrow tip */
line to calc(50% - 10px) calc(100% - 8px),
line to 12px calc(100% - 8px),
arc to 0 calc(100% - 20px) of 12px,
line to 0 12px,
arc to 12px 0 of 12px,
close
);
}
Source: CSS Borders Level 4 — §border-shape; una.im/border-shape (the ChromeStatus record’s sample link); ChromeStatus — CSS border-shape.
Browser compatibility
| Browser | Version | Notes |
|---|---|---|
| Chrome | 147 | BCD marks the property experimental (standard-track, not deprecated) |
| Chrome Android | 147 | BCD mirror of Chrome |
| Edge | 147 | BCD mirror of Chrome |
| Firefox | No support (false) | position requested in mozilla/standards-positions#1365 — “No signal” per the ChromeStatus record (2026-08-02) |
| Safari | No support (false) | position requested in WebKit/standards-positions#625 — “No signal” per the ChromeStatus record (2026-08-02) |
Specifications
| Specification | Section |
|---|---|
| CSS Borders and Box Decorations Level 4 (editor’s draft) | § border-shape |