{"summary":"巢狀圓角如何逐層計算，以及什麼時候改用連續曲率圓角，讓卡片和表單的轉角更規整。","notes":"<p>一張圓角 16px、內距 8px 的卡片，裡面的按鈕也用 16px 圓角，轉角處兩條邊框的間距就會比直邊處寬，按鈕看起來沒有貼合卡片；較大的圓角接直邊的地方，還會有一道折痕。做法有以下四條：</p>\n        <ol>\n        <li><strong>等距內縮</strong>：用於表單、巢狀卡片、對話框這類有內外兩層圓角的地方。每一層都依「內圓角 = 外圓角 − 間距」計算，內外共用一個圓心，轉角處的間距才會和直邊處相同。卡片圓角 16、內距 8，裡面的按鈕圓角就是 8。</li>\n        <li><strong>多層巢狀</strong>：三層以上時，由外往內逐層計算。對話框圓角 32、內距 16，內部面板和按鈕為 16；面板裡再內縮 8 放一個標籤，標籤為 8。同一層級的元素共用一個圓角，最小不低於 4。</li>\n        <li><strong>膠囊和圓形</strong>：巢狀在容器裡的膠囊形和圓形元素不參與計算，始終保持完整的圓形。</li>\n        <li><strong>連續曲率圓角</strong>：用於圓角較大、連接處看得出折痕，或想要接近 iOS 圓角觀感的情況。一般圓角在接直邊處曲率突然變化，連續曲率圓角（超橢圓）讓曲率逐漸增大，過渡更順。寫法是 <code>border-radius: 32px; corner-shape: superellipse(1.25);</code></li>\n        </ol>\n        <p>另外，<code>corner-shape</code> 目前只有 Chrome 和 Edge 139 以上版本支援；Safari 和 Firefox 會自動改用一般圓角，不需要額外處理。</p>\n        <p>附帶的提示詞會由外往內重新計算你指定介面的圓角；專案中有圓角 token 時，直接修改 token。</p>","prompt":"Make the corner radii in this UI consistent, then switch them to continuous\ncorners. Work on the screen or components I name; ask me if I have not\nnamed them. If the project has radius tokens, change those instead of\nhard-coding values.\n\n1. Inner radius = outer radius - padding (r = R - p)\n- Go from the outside in: dialog or card -> panels, inputs, buttons ->\n  chips and tags. A box p inside a container with radius R gets R - p,\n  so both corners share one center. Example: dialog 32, padding 16 ->\n  panels and buttons 16; a chip 8 inside a 16 panel -> 8.\n- Boxes on the same level share one radius. Never go below 4.\n- Pills and circles stay fully round.\n- Keep every padding, gap and radius on a 4px grid.\n\n2. Continuous corners\n- Keep border-radius and add the curve as progressive enhancement:\n    @supports (corner-shape: superellipse(1.25)) {\n      :where(*) { corner-shape: superellipse(1.25); }\n    }\n  Set corner-shape: round on pills and circles.\n- Chrome and Edge 139+ render it; Safari and Firefox skip the block and\n  show the plain border-radius.\n\nWhen done, list every radius you changed as \"element: old -> new\".","skill":"/skills/kubai-continuous-corners/SKILL.md","skillText":"# 递进式圆角与连续曲率圆角\n\n《999 个小技巧，让你 Vibe 的产品更有质感》第 004 期 · @kubai087\n\n在用户的项目里按下面的要求改造。要求以用户的口吻写成：文中的 I、me、my 指用户；写着要先问的地方，先停下来问用户再继续。\n\n## 改造要求\n\nMake the corner radii in this UI consistent, then switch them to continuous\ncorners. Work on the screen or components I name; ask me if I have not\nnamed them. If the project has radius tokens, change those instead of\nhard-coding values.\n\n1. Inner radius = outer radius - padding (r = R - p)\n- Go from the outside in: dialog or card -> panels, inputs, buttons ->\n  chips and tags. A box p inside a container with radius R gets R - p,\n  so both corners share one center. Example: dialog 32, padding 16 ->\n  panels and buttons 16; a chip 8 inside a 16 panel -> 8.\n- Boxes on the same level share one radius. Never go below 4.\n- Pills and circles stay fully round.\n- Keep every padding, gap and radius on a 4px grid.\n\n2. Continuous corners\n- Keep border-radius and add the curve as progressive enhancement:\n    @supports (corner-shape: superellipse(1.25)) {\n      :where(*) { corner-shape: superellipse(1.25); }\n    }\n  Set corner-shape: round on pills and circles.\n- Chrome and Edge 139+ render it; Safari and Firefox skip the block and\n  show the plain border-radius.\n\nWhen done, list every radius you changed as \"element: old -> new\".\n"}