Space & shapeMarkdown
Radius
Corner radii follow a seven-step scale from sharp architectural edges (0px) to full pills (9999px). Note that md (8px), lg (16px), and xl (24px) are larger than Tailwind's default scale.
Radius scale
| Token | Tailwind | px | rem | Use | Shape |
|---|---|---|---|---|---|
| --radius-none | rounded-none | 0px | 0rem | Architectural edges, tables | |
| --radius-xs | rounded-xs | 2px | 0.125rem | Badges, tags | |
| --radius-sm | rounded-sm | 4px | 0.25rem | 24–32px controls (xs, sm) | |
| --radius-md | rounded-md | 8px | 0.5rem | 40–48px controls (md, lg), inputs | |
| --radius-lg | rounded-lg | 16px | 1rem | Cards | |
| --radius-xl | rounded-xl | 24px | 1.5rem | Sheets, dialogs | |
| --radius-full | rounded-full | 9999px | 624.9375rem | Pills, avatars |
Nested radius worked example
Formula: outer radius (16px, rounded-lg) = inner radius (8px, rounded-md) + padding (8px, p-2).
inner 8px + pad 8px = outer 16px
Calculate nested corners using outer radius = inner radius + padding so concentric edges share the same center point.
Usage
Apply radius utilities in Tailwind CSS or custom properties in CSS:
<div className="rounded-lg border border-border bg-card p-2">
<div className="rounded-md border border-border bg-muted p-4">
Nested container (8px + 8px = 16px)
</div>
</div>.card {
border-radius: var(--card-radius);
padding: var(--space-2);
}
.card-inner {
border-radius: var(--radius-md);
}Do and don't
Do: Keep nested corners concentric
Set outer radius to inner radius plus padding (for example, rounded-lg 16px around p-2 8px and rounded-md 8px).
Don't: Assume Tailwind default pixel values
Do not treat rounded-md, rounded-lg, or rounded-xl as Tailwind's default 6px, 8px, or 12px because Monoplinth maps them to 8px, 16px, and 24px.
Accessibility
- Focus rings (
2pxoutline with2pxoffset) follow the element'sborder-radiusautomatically so keyboard focus tracks rounded controls cleanly.
Rationale
Distinct radius steps pair directly with control heights (sm for 24–32px, md for 40–48px) and surfaces (lg for cards, xl for dialogs), preventing mismatched corners.