Why now

On 2026-12-01 Josh W. Comeau published "Creating Beveled Corners with “corner-shape”", and on 12-02 it picked up discussion under Lobsters' web tag. The post walks through the "somewhat-unintuitive" ways he used corner-shape to build the diagonal, beveled corners of the retro-sci-fi UI in his NPM package "Button Sounds".

corner-shape itself shipped in Chrome 139 (stable on 2025-08-05), but two things suggest it has now reached the "people are actually using it" phase:

Corner shapes other than "round" have long been faked with clip-path, SVG, or images. Now they're standardized as an extension of border-radius, so it's worth understanding what that buys you and what quirks come with it.

The problem

Designs often call for corners that aren't round:

Each existing technique has drawbacks:

  1. Cutting with clip-path: polygon(...): you get the shape, but clip-path is applied after borders, outlines, and box-shadows are painted, so it chops them off too. To get a shadow you have to work around it, e.g. with filter: drop-shadow() on a parent.
  2. SVG backgrounds or images: hard to make resizable, and hard to drive theme colors or border widths from CSS variables.
  3. Stacking pseudo-elements: dropping a triangle on each corner, etc. The code grows, and hit-testing doesn't match the visual shape.

What we want is something where, like border-radius, the box's own shape changes and borders, outlines, shadows, overflow clipping, and hit-testing all follow it.

How it works

border-radius sets the size, corner-shape sets the shape

In CSS Borders and Box Decorations Level 4, §3.7, the work is split: border-*-radius sizes each corner region, and corner-*-shape decides what curve is drawn inside that region.

.box {
  border: 2px solid tomato;
  border-radius: 16px;   /* size of the corner region */
  corner-shape: bevel;   /* join it with a straight line */
}