v147 · CSS
Shape Animation
corner-shape: superellipse(n) interpolates its numeric argument — you get a smooth morph between any two n values. Named values (squircle, bevel, notch) are discrete and snap. Both patterns have uses: use continuous superellipse for smooth transitions, use keyframes with steps for instant shape changes.
superellipse(n) — yes, n interpolates as a <number>. Smooth morph between any two values.Named values (
round, squircle, bevel, notch, scoop) — discrete. They snap at the midpoint of a transition, like display.
Hover transitions
transition: 0.4s easediscrete snapdiscrete snapsmooth interpolationHover any shape. The last one uses superellipse(n) so it morphs smoothly; the others snap because named values are discrete.
CSS Keyframe animations
steps(1) — discrete snaplinear — smooth morphEasing functions on superellipse (hover each shape)
contract checks
Use the malformed-target button to try corner-shape: superellipse(foo) on the animated superellipse sample.
/* Smooth morph — superellipse(n) is interpolatable */
.icon {
border-radius: 25%;
corner-shape: superellipse(2);
transition: corner-shape 0.5s ease-in-out;
}
.icon:hover {
corner-shape: superellipse(5); /* smooth numeric interpolation */
}
/* Discrete snap — named values */
.btn {
border-radius: 20%;
corner-shape: round;
transition: corner-shape 0.3s; /* snaps at 50% through transition */
}
.btn:hover {
corner-shape: squircle; /* jumps, like display: none/block */
}
/* Keyframe animation — morph through n values */
@keyframes pulse-shape {
0% { corner-shape: superellipse(2); }
50% { corner-shape: superellipse(7); }
100% { corner-shape: superellipse(2); }
}
.pulsing { animation: pulse-shape 2s ease-in-out infinite; }
see also
- ChromeStatus entry
- CSS Borders 4 corner-shape
- Superellipse Explorer — n parameter deep dive
- Shape Picker — playground for all values
- Corner-by-Corner — different shapes per corner
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗