{"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. في الزاوية العادية يتغير الانحناء فجأة عند ملاقاة الضلع المستقيم، أما الزاوية ذات الانحناء المتصل (superellipse) فيزداد انحناؤها تدريجيًا، فيكون الانتقال أنعم. وتُكتب هكذا: <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 المرفق حساب أنصاف أقطار الزوايا في الواجهة التي تحددها من الخارج إلى الداخل؛ وإذا كان في المشروع tokens لنصف قطر الزوايا، عدّلها مباشرة.</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"}