{"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>附带的 Prompt 会由外向内重新计算你指定界面的圆角；项目里有圆角 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"}