Part of the jedee wiki — An LLM wiki, written by Claude Code, about the methods and techniques behind this site.

Squircle corners

On GitHub:

A squircle is a rounded rectangle whose corners follow a superellipse rather than a quarter circle. A circular corner joins the straight edge abruptly: the edge is flat right up to the point where the arc starts, and then it curves at full strength. A superellipse eases into the bend: the curve starts gently where it leaves the edge and tightens towards the middle of the corner, so there is no visible seam. Apple’s app icons and macOS windows use this kind of corner, and design tools offer it as “smooth corners” (Sketch, Figma’s corner smoothing).

In CSS

CSS draws it with corner-shape, from CSS Borders and Box Decorations Level 4. It changes the shape of a corner; border-radius still sets its size, so a corner with no radius stays square whatever its shape. Borders, backgrounds and shadows follow the shape.

.card {
  border-radius: 0.45rem;
  corner-shape: squircle;
}

The keywords are shorthands for superellipse(n), where the exponent sets how square the corner is: round is superellipse(1), squircle is superellipse(2), square is superellipse(infinity), bevel is superellipse(0) (a straight cut), and negative values (scoop, notch) bend the corner inward. Browsers report the computed value in that form: in Chrome, squircle reads back as superellipse(2). MDN on corner-shape lists them all.

A squircle at the same radius looks smaller. The exponent is a step from round towards square, so the curve fills more of the corner than the round arc does and the corner reads tighter. To look as rounded as before, a squircle needs a larger radius; how much larger is a judgment by eye, not a formula.

Support. Chrome shipped corner-shape in version 139 (August 2025). Safari and Firefox don’t support it yet; there the declaration is ignored and the corner stays round. That makes it safe to add, but it also means the larger radius a squircle wants would show up in those browsers as a plainly bigger round corner. Changing the radius inside @supports (corner-shape: squircle) keeps the two apart.

Circles and pills. A border-radius: 50% circle or a 999px pill is all corner, so as a squircle it turns into a rounded square or a flat-ended capsule. A stylesheet that applies corner-shape broadly has to set those back to round.

In jedee

Every rounded corner has been a squircle since 2026-11-29, at 1.5× the round radius. The site’s radii are small on purpose (3px and 4.8px), and at those sizes the shape alone changed less than a pixel per corner; Johan picked 1.5× from a side-by-side preview with a radius slider. In Chrome that makes the small radius 4.5px and the medium 7.2px. Other browsers get the round corners at the old sizes, unchanged.

Two rules do it. global-styles.css sets the shape on everything, and variables.css raises the two radius tokens where the shape can be drawn:

*,
::before,
::after {
  corner-shape: squircle;
}

@supports (corner-shape: squircle) {
  :root {
    --border-radius-small: 0.28125rem;
    --border-radius-medium: 0.45rem;
  }
}

⚠️ The 1.5× values are written out, not computed: a custom property can’t refer to itself, so the override can’t say “the token times 1.5”. A change to borderRadius.json has to be repeated here by hand, or the two drift with no error.

The round exceptions restate corner-shape: round: the pill buttons and round icon buttons through a --button-corner custom property on .button (the small, square-cornered button variant sets it to squircle), the Webmentions avatars, and the Android pull-to-refresh disc. The two radii written as plain values rather than tokens, the pamphlet’s 7px and one 0.2em, became squircles without the extra size, so they read a little tighter than before.

The token file keeps the round values, so the design file does not know about squircles: Design token sync carries the radius tokens to FigCraft and Penpot as 3px and 4.8px with plain round corners.

EE stock vs jedee: Eleventy Excellent has no corner shapes; the radius tokens are EE’s structure, the squircle and the 1.5× override are jedee’s.

Raw source: src/_raw/dev-notes/How squircle corners work.md

Keyboard shortcuts

⌘K
Open the search
↓ ↑
Move through the search results
Enter
Open the selected result
Esc
Close the search or this list
⌥G
Show or hide the layout grid
⌥R
Show or hide the rhythm lines
⌥L
Open this list