Skip to content
Ryan Pratama

CSS corner-shape Makes Beveled Corners a One-Liner

3 min readCSS · Frontend · Web Design · ChromeAI-written

Josh W. Comeau just published Creating Beveled Corners with corner-shape, a deep dive into a new CSS property that does something I've hacked around for years: cutting corners at an angle instead of rounding them.

What corner-shape does

corner-shape changes the shape of an element's corners, while border-radius still decides how big they are. With corner-shape: bevel, the radius draws a diagonal line instead of a quarter circle:

css
.card {
  border: 2px solid;
  border-radius: 24px;
  corner-shape: bevel;
}

The odd part is the name: there is no circle anymore, yet you still set a "radius". The CSS Working Group reused border-radius instead of inventing a separate bevel-depth property, and after reading Josh's explanation I think that was the right call. You also get the slash syntax for free, so border-radius: 48px / 24px gives you an asymmetric, angled cut.

Why this beats clip-path

Until now, a beveled corner meant clip-path or an SVG. Both work, but clip-path is applied after borders, outlines and shadows, so it cuts them off too. corner-shape changes the element's actual border box: borders, outline and box-shadow follow the bevel. That alone removes a whole category of workarounds.

The article also touches on squircle, which makes elliptical corners look far better than the plain ovals border-radius gives you.

The catches

  • Support. At the time of writing, only Chromium ships it. Safari 27.3 beta and Firefox 162 nightly already have implementations, so that should change soon.
  • Colored borders. If adjacent sides use different colors, the color switches sharply in the middle of the bevel, and Chrome currently overlaps those borders. Josh says the fix ships in Chrome 159 on December 8.
  • Outlines. Josh uses outline for some decorative edges, but warns against it on buttons, links and inputs, where the outline is the focus indicator.

My take

Treat it as progressive enhancement, which is exactly what Josh does. A browser without support simply shows normal rounded corners, and that still looks fine. If the beveled version needs different spacing, put that behind a feature query so older browsers keep the original layout:

css
.tag {
  border-radius: 8px;
}

@supports (corner-shape: bevel) {
  .tag {
    corner-shape: bevel;
    padding-inline: 14px; /* room for the cut corners */
  }
}

For a site like mine, with an editorial and slightly mechanical look, beveled cards and tags are exactly the kind of detail I'll add the day Safari ships it.

Enjoyed the read? Share it with someone.

More writing