Menu

1 / 5

CSS corner-shape: squircles, scoops and notches

DEV Community: css·richi.codes·4 days ago
#CnwBEVXN
#devtocss#devto#dev#corner#shape
Reading 0:00
15s threshold

This note has an interactive demo. Try it in the original

Since it arrived, border-radius has given us exactly one kind of corner: a quarter of an ellipse. corner-shape changes that. You keep border-radius for the size of the corner and add one property for its shape : squircle, bevel, scoop, notch, or anything in between. Borders, outlines and shadows follow the new outline, and the browser can animate from one shape to another.

Play with the demo above first. Press the chips, drag the K slider, then hit "Morph between shapes". Watch the teal border and the glow: they're not a separate layer, they bend with the box.

Size from border-radius, shape from corner-shape

The property doesn't replace border-radius , it builds on it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.