Nested corners. Get the inner radius that matches the outer one, so nested corners look even.
How it works
Set the outer corner
The radius of the outer card or container.
Set the gap
The padding between the outer edge and the inner one.
Copy the inner radius
Outer radius minus the gap, previewed side by side with the mismatched version.
Questions
Why do nested corners look wrong?
With the same radius inside and out, the gap between the curves is wider at the corners than along the sides. Subtracting the padding keeps it even.
What if the padding is bigger than the radius?
The inner corner becomes square, at 0, which is the even result.
More design tools
- Box shadow: Soft, layered CSS shadows.
- Spacing scale: Spacing steps on a 4 or 8 point grid.
- Grid calculator: Column widths from columns, gutters and margins.