{"summary":"Cách tính bo góc lồng nhau qua từng lớp, và khi nào nên chuyển sang bo góc liên tục, để góc của thẻ và biểu mẫu gọn gàng hơn.","notes":"<p>Một tấm thẻ bo góc 16px, khoảng đệm 8px, nếu nút bên trong cũng bo góc 16px thì khoảng cách giữa hai đường viền ở góc sẽ rộng hơn ở cạnh thẳng, nút trông như không khớp với thẻ; ở chỗ bo góc lớn nối với cạnh thẳng còn có một nếp gãy. Có bốn cách làm:</p>\n        <ol>\n        <li><strong>Thu vào đều</strong>: dùng cho biểu mẫu, thẻ lồng nhau, hộp thoại và những chỗ có hai lớp bo góc trong và ngoài. Mỗi lớp đều tính theo “bo góc trong = bo góc ngoài − khoảng cách”, trong và ngoài dùng chung một tâm, khoảng cách ở góc mới bằng ở cạnh thẳng. Thẻ bo góc 16, khoảng đệm 8, thì nút bên trong bo góc 8.</li>\n        <li><strong>Lồng nhiều lớp</strong>: từ ba lớp trở lên thì tính lần lượt từ ngoài vào trong. Hộp thoại bo góc 32, khoảng đệm 16, bảng bên trong và nút là 16; trong bảng thụt vào thêm 8 để đặt một nhãn, nhãn là 8. Các phần tử cùng lớp dùng chung một bo góc, nhỏ nhất không dưới 4.</li>\n        <li><strong>Hình viên thuốc và hình tròn</strong>: các phần tử hình viên thuốc và hình tròn lồng trong vùng chứa không tham gia tính toán, luôn giữ tròn hoàn toàn.</li>\n        <li><strong>Bo góc liên tục</strong>: dùng khi bo góc lớn, chỗ nối thấy rõ nếp gãy, hoặc muốn có cảm giác gần với bo góc của iOS. Bo góc thông thường thay đổi độ cong đột ngột ở chỗ nối với cạnh thẳng, bo góc liên tục (superellipse) cho độ cong tăng dần, chuyển tiếp mượt hơn. Cách viết là <code>border-radius: 32px; corner-shape: superellipse(1.25);</code></li>\n        </ol>\n        <p>Ngoài ra, <code>corner-shape</code> hiện chỉ được Chrome và Edge từ phiên bản 139 trở lên hỗ trợ; Safari và Firefox tự động quay về bo góc thông thường, không cần xử lý thêm.</p>\n        <p>Prompt đi kèm sẽ tính lại bo góc từ ngoài vào trong cho giao diện bạn chỉ định; nếu dự án có token bo góc thì sửa thẳng vào 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"}