8.3 · Typography & shape

Beyond round corners: corner-shape

Squircles, bevels and notches with a single property.

border-radius sets how big a corner is. corner-shape sets its curve: round, squircle, bevel, scoop, notch or any superellipse(k) in between.

Borders, backgrounds, shadows and outlines all follow the shape. Browsers without support fall back to round corners.

Before
/* An SVG mask per shape */
.tile {
  mask: url(squircle.svg);
  /* and the border can't follow it */
}
Now
.tile {
  border-radius: 2rem;
  corner-shape: squircle;
}

.custom {
  corner-shape: superellipse(3);
}