Skip to content

fix(ui): soften continuous corners to superellipse(1.1) - #319

Merged
AprilNEA merged 1 commit into
masterfrom
xuan/code-474
Jul 29, 2026
Merged

fix(ui): soften continuous corners to superellipse(1.1)#319
AprilNEA merged 1 commit into
masterfrom
xuan/code-474

Conversation

@AprilNEA

Copy link
Copy Markdown
Member

Closes CODE-474. Follow-up to CODE-449 (#282).

Problem

corner-shape: squircle (= superellipse(2)) cuts into the 45° apex only 54% as deep as a circular corner at the same border-radius — rounded-xl 12px reads as ≈6.5px, 2xl 16px as ≈8.7px, 3xl 24px as ≈13px. The whole app visibly lost corner roundness.

Evidence

Pixel-level XOR fit inside our own Electron, reference = figma-squircle@1.1.0 at cornerSmoothing: 0.6 (the --smoothing-ios token in the apple-graph library these corners were adopted from):

curve XOR vs iOS reference (px²)
round = superellipse(1.00) 509 (0.3% of the corner box)
superellipse(1.10) 1644
superellipse(1.50) 5489
squircle = superellipse(2.00) 8697 (17× round)

iOS's continuous corner is shape-wise almost a circle; its character comes from curvature-transition smoothing (G2), which the superellipse family cannot express — any smoothing there is paid for with a shallower apex. Even superellipse(1.01) is farther from the Apple curve than plain round.

Change

superellipse(1.1) (decision: keep a hint of the continuous transition; the strictly-faithful answer would be round). Keeps ~94% of the perceived radius — 0.7px shallower at 12px, imperceptible — while the @supports gate now tests the exact value in use. Fractional superellipse() support and the squircle ≡ superellipse(2) / round ≡ superellipse(1) mapping were verified empirically in the bundled Chromium.

@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

CODE-474

@AprilNEA
AprilNEA merged commit c8ea47c into master Jul 29, 2026
10 checks passed
@AprilNEA
AprilNEA deleted the xuan/code-474 branch July 29, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant