René's URL Explorer Experiment


Title: corner-shape: squircle renders Apple continuous, not CSS superellipse(2): make corner-shape spec-correct and add -ios-corner-shape: continuous · Issue #11452 · NativeScript/NativeScript · GitHub

Open Graph Title: corner-shape: squircle renders Apple continuous, not CSS superellipse(2): make corner-shape spec-correct and add -ios-corner-shape: continuous · Issue #11452 · NativeScript/NativeScript

X Title: corner-shape: squircle renders Apple continuous, not CSS superellipse(2): make corner-shape spec-correct and add -ios-corner-shape: continuous · Issue #11452 · NativeScript/NativeScript

Description: Summary corner-shape: squircle (added in #11365) maps to kCACornerCurveContinuous on iOS. I wrote that mapping believing Apple's continuous corner and the CSS squircle are the same curve. They are not, and the difference is large. Propos...

Open Graph Description: Summary corner-shape: squircle (added in #11365) maps to kCACornerCurveContinuous on iOS. I wrote that mapping believing Apple's continuous corner and the CSS squircle are the same curve. They are ...

X Description: Summary corner-shape: squircle (added in #11365) maps to kCACornerCurveContinuous on iOS. I wrote that mapping believing Apple's continuous corner and the CSS squircle are the same curve. They ...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/11452

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"corner-shape: squircle renders Apple continuous, not CSS superellipse(2): make corner-shape spec-correct and add -ios-corner-shape: continuous","articleBody":"## Summary\n\n`corner-shape: squircle` (added in #11365) maps to `kCACornerCurveContinuous` on iOS. I wrote that mapping believing Apple's continuous corner and the CSS `squircle` are the same curve. They are not, and the difference is large. Proposal: make `corner-shape` follow the [CSS Borders Level 4](https://drafts.csswg.org/css-borders-4/#corner-shaping) definitions, and expose Apple's continuous corner through a separate iOS-only property, `-ios-corner-shape`. Target: 9.2.\n\n## What is wrong\n\nMeasured on the iOS simulator against a real `CALayer` with `cornerCurve = .continuous` (200×100 layer, r=20, 4× raster diff):\n\n| Shape at the same `border-radius` | Max gap from Apple continuous | Pixels differing |\n|---|---|---|\n| Circle (CSS `round`, `kCACornerCurveCircular`) | 0.019 r (~0.3 pt at r=16) | 756 |\n| CSS `squircle` = `superellipse(2)` | 0.187 r (~3 pt at r=16) | 4368 |\n\nApple's continuous corner is essentially CSS `round` with the curvature eased in over a `1.528665 r` run-up (`CALayer.cornerCurveExpansionFactor(.continuous)`). The CSS squircle is a much squarer corner. No `superellipse(K)` at any radius gets closer to continuous than a plain circle does, so the two cannot be reconciled by picking a different K.\n\nConsequences today:\n\n- A web developer reading `corner-shape: squircle` expects the Chrome/Safari shape and gets something visually indistinguishable from `round`.\n- Non-uniform radii, borders and shadows fall back to circular arcs (documented limitation of #11365). #11451 tries to close that gap and correctly draws the CSS `superellipse(2)`, which means that after it merges, uniform and non-uniform squircle views would disagree by ~0.19 r, worse than the circular fallback.\n- `CALayerCornerCurve` only has `circular` and `continuous`. There is no native way to draw the CSS shape, so the two curves need different rendering strategies anyway.\n\n## Proposal\n\n1. **`corner-shape` follows the spec.**\n   - `round` = `kCACornerCurveCircular` (unchanged; it is exactly `superellipse(1)`).\n   - `squircle` = `superellipse(2)`, drawn as a `CAShapeLayer` mask path on every branch, including the uniform-radius fast path, since Core Animation cannot draw it. Each corner is two cubic Béziers (one per half-corner, mirrored across the diagonal): in a unit corner box from `(0, 1)` to the diagonal point `(h, h)` with `h = 0.5^(1/4) = 0.840896`, control points `(0.38905, 1)` and `(h − 0.1678, h + 0.1678)`. Max deviation from the exact curve is 1.65e-4 r. This is how Blink renders it, and `superellipse(K)` can be added later on the same path by refitting the three constants per K.\n   - Android can implement the same path with `Path.cubicTo`.\n2. **`-ios-corner-shape: continuous`** (iOS-only property, ignored elsewhere) maps to `kCACornerCurveContinuous` on the uniform fast path, so it stays free. For non-uniform radii, borders and shadows it draws Apple's curve, which is three cubic Béziers per corner. With `d1`/`d2` the edge vectors from the vertex (length r each), every point is `v + a·d1 + b·d2`:\n   ```\n   line  to (1.528665, 0)\n   cubic cp (1.08849, 0)          cp (0.868407, 0)          to (0.631494, 0.074911)\n   cubic cp (0.372824, 0.169060)  cp (0.169060, 0.372824)   to (0.074911, 0.631494)\n   cubic cp (0, 0.868407)         cp (0, 1.08849)           to (0, 1.528665)\n   ```\n   This is byte-for-byte what `UIBezierPath(roundedRect:byRoundingCorners:cornerRadii:)` emits and renders pixel-identical to the layer. The corner consumes `cornerCurveExpansionFactor(.continuous) × r` of each edge, so the radius cap needs that factor. When the non-zero radii are equal, `maskedCorners` + `cornerRadius` + `cornerCurve` renders a subset of corners natively with no mask at all.\n3. If both are set, `-ios-corner-shape` wins on iOS (platform override), otherwise `corner-shape` applies.\n\n## Breaking change\n\n`corner-shape: squircle` was released recently and currently renders continuous. After this change it renders the (squarer) spec shape and goes through a mask. Anyone who adopted it for the iOS system look migrates to `-ios-corner-shape: continuous`. Doing this early keeps the blast radius small; the changelog should call it out explicitly.\n\n## Related\n\n- #11365 added `corner-shape` with the continuous mapping.\n- #11451 implements the spec squircle for non-uniform radii and is deferred until this lands.\n","author":{"url":"https://github.com/edusperoni","@type":"Person","name":"edusperoni"},"datePublished":"2026-09-25T19:03:46Z","url":"https://github.com/NativeScript/NativeScript/issues/11452"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:dac8af60-c466-ee3c-3d50-400c5b721b4b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC47A:842EC:13F8468:1AAC942:6B012DDD
html-safe-nonce2beb827243a9d116146aedde53f065bb4bf856d2fd0e83d38d03c4044587da64
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDdBOjg0MkVDOjEzRjg0Njg6MUFBQzk0Mjo2QjAxMkRERCIsInZpc2l0b3JfaWQiOiIyNjAzNDQ4ODcxMjcxMDgzNDg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4b414acf2b10de51b90ae7fb050def2f0f4c469eece30e2e39f6eeb3263e51cb
hovercard-subject-tagissue:5587270485
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/11452/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dc988c356e80a779efe9bf5bf1be84cd8dc9a64d255d86e1e2852142ccea2d75/NativeScript/NativeScript/issues/11452
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dc988c356e80a779efe9bf5bf1be84cd8dc9a64d255d86e1e2852142ccea2d75/NativeScript/NativeScript/issues/11452
og:image:altSummary corner-shape: squircle (added in #11365) maps to kCACornerCurveContinuous on iOS. I wrote that mapping believing Apple's continuous corner and the CSS squircle are the same curve. They are ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameedusperoni
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/11452#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11452
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11452
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/11452
Reloadhttps://github.com/NativeScript/NativeScript/issues/11452
Reloadhttps://github.com/NativeScript/NativeScript/issues/11452
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
https://github.com/NativeScript/NativeScript
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11452
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11452
corner-shape: squircle renders Apple continuous, not CSS superellipse(2): make corner-shape spec-correct and add -ios-corner-shape: continuoushttps://github.com/NativeScript/NativeScript/issues/11452#top
csshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22css%22
featurehttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22feature%22
os: ioshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20ios%22
9.2https://github.com/NativeScript/NativeScript/milestone/68
https://github.com/edusperoni
edusperonihttps://github.com/edusperoni
on Sep 25, 2026https://github.com/NativeScript/NativeScript/issues/11452#issue-5587270485
#11365https://github.com/NativeScript/NativeScript/pull/11365
CSS Borders Level 4https://drafts.csswg.org/css-borders-4/#corner-shaping
feat(core): corner-shape css property for continuous corners on iOS #11365https://github.com/NativeScript/NativeScript/pull/11365
fix(ios): honor corner-shape: squircle for non-uniform border radii #11451https://github.com/NativeScript/NativeScript/pull/11451
feat(core): corner-shape css property for continuous corners on iOS #11365https://github.com/NativeScript/NativeScript/pull/11365
fix(ios): honor corner-shape: squircle for non-uniform border radii #11451https://github.com/NativeScript/NativeScript/pull/11451
NathanWalkerhttps://github.com/NathanWalker
9.2https://github.com/NativeScript/NativeScript/milestone/68
on Sep 25, 2026https://github.com/NativeScript/NativeScript/issues/11452#event-31871061507
NathanWalkerhttps://github.com/NathanWalker
csshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22css%22
featurehttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22feature%22
os: ioshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20ios%22
on Oct 23, 2026https://github.com/NativeScript/NativeScript/issues/11452#event-34091024085
HBlanquetohttps://github.com/HBlanqueto
on Nov 6, 2026https://github.com/NativeScript/NativeScript/issues/11452#event-35350781872
feat(design): radio por tipo de barra y esquina continua (malaysia AD…https://github.com/HBlanqueto/barrierkit/commit/0c0ad9a3923b86dbf6e8f5b66b48f1a20ca5311a
0c0ad9ahttps://github.com/HBlanqueto/barrierkit/commit/0c0ad9a3923b86dbf6e8f5b66b48f1a20ca5311a
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/NativeScript/issues/11452
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11452
csshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22css%22
featurehttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22feature%22
os: ioshttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20ios%22
9.2No due datehttps://github.com/NativeScript/NativeScript/milestone/68
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.