Skip to content

feat(core): corner-shape css property for continuous corners on iOS - #11365

Merged
NathanWalker merged 1 commit into
mainfrom
feat/corner-shape
Aug 26, 2026
Merged

NathanWalker merged 1 commit into
mainfrom
feat/corner-shape

Conversation

@edusperoni

Copy link
Copy Markdown
Contributor

Stacked on #11364 — only the last commit (feat(core): corner-shape css property for continuous corners on iOS) is new here; the first two belong to the base PR.

PR Checklist

What is the current behavior?

Corners always render as circular arcs — CALayer.cornerCurve is never set, so layers use the kCACornerCurveCircular default. Apps that want Apple's smooth "continuous" corners (the squircle look used across iOS system UI: app icons, alerts, cards) have to patch @nativescript/core dist output or poke view.ios.layer.cornerCurve manually.

What is the new behavior?

A new corner-shape CSS property — the CSS Borders Level 4 property recently shipped on the web (Chrome 139; proposed by Safari) — with the round | squircle keyword subset:

.card {
	border-radius: 16;
	corner-shape: squircle; /* Apple's continuous corner curve */
}
  • squircle maps to kCACornerCurveContinuous on iOS; round (the default) keeps kCACornerCurveCircular, so existing apps are visually unchanged.
  • Follows the standard Background flow: Style.cornerShape → backgroundInternal.withCornerShape() → applied in background.ios.ts on the uniform-border fast path where corners render via layer.cornerRadius.
  • Android is a no-op (always round) — there is no native equivalent.

Known limitation (documented in the commit): the path-drawn branches — non-uniform borders, box-shadow outlines, clip masks — build circular-arc UIBezierPaths and are unaffected, so a squircle view falls back to circular corners in those combinations. Teaching those generators to emit the continuous curve (a superellipse approximation) can land as a follow-up.

3 new unit tests (default, squircle round-trip to Background, unknown-keyword rejection); full suite passing (403).

@nx-cloud

nx-cloud Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 275a118

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 11s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-26 19:15:37 UTC

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11365
npm i https://pkg.pr.new/@nativescript/vite@11365
npm i https://pkg.pr.new/@nativescript/webpack@11365

commit: 275a118

Base automatically changed from fix/css-function-value-splitting to main August 26, 2026 18:57
Adds the CSS Borders Level 4 corner-shape property with the round and
squircle keywords. squircle maps to kCACornerCurveContinuous - Apple's
smooth corner curve used across system UI - and round keeps the circular
default, so nothing changes for existing apps.

The curve applies on the uniform-border fast path, where corners render
through layer.cornerRadius. The path-drawn branches - non-uniform
borders, box-shadow outlines, clip masks - still build circular arcs, so
a squircle view keeps circular corners there until those generators
learn to emit the continuous curve. Android always renders round.

CSS: corner-shape only became addressable on the web recently (Chrome
139, Safari's proposal), so round | squircle is the supported subset.
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.

2 participants