Mixins / foldkit-mixins/theme

nested

function · packages/mixins/src/theme/tokens.ts:326

function nested(): string
function nested(outer: string, inset: string, border?: string): string

The radius of a rounded surface inset in another, so their corners are concentric: the outer radius less the inset between them and the outer surface's border, never below zero. Past a large radius, or with uneven gaps, the two read as independent and may be tuned by eye.

With no arguments, it reads what the nearest container that nests its children published, so a row, a pill or a highlight inside a padded panel follows the panel's corner without repeating its arithmetic. The values inherit, so it reads the nearest ancestor that nests, however deep and in whatever component; it is square only where no ancestor does.