Skip to main content
Version: Next

Spacing & Radius

Spacing scale (4px base unit)

TokenValuePixels
--shumoul-space-10.25rem4px
--shumoul-space-20.5rem8px
--shumoul-space-30.75rem12px
--shumoul-space-41rem16px
--shumoul-space-51.5rem24px
--shumoul-space-62rem32px
--shumoul-space-73rem48px
--shumoul-space-84rem64px

Use these for margin/padding/gap in any new component instead of an arbitrary pixel value — this keeps vertical rhythm consistent across the navbar, cards, footer, and homepage sections.

Corner radius — rounded, professional, never playful

TokenValueUsed for
--shumoul-radius-sm6pxButtons, badges, menu links, code inline spans, inputs
--shumoul-radius-md10pxCards, admonitions, tables, code blocks, dropdowns
--shumoul-radius-lg16pxLarge surfaces (hero panels, feature cards)
--shumoul-radius-pill999pxSearch box, version badge, small status badges

The scale deliberately stops short of a fully "bubbly" look (no 24px+ radii on large surfaces) — enterprise software reads as more trustworthy with moderate rounding, not pill-shaped panels everywhere.

Applied to Infima

--ifm-button-border-radius: var(--shumoul-radius-sm);
--ifm-card-border-radius: var(--shumoul-radius-md);
--ifm-code-border-radius: var(--shumoul-radius-sm);
--ifm-global-radius: var(--shumoul-radius-md);

Motion tokens

--shumoul-transition-fast: 120ms ease; /* hover color/background changes */
--shumoul-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1); /* larger movement, card lift */

Every interactive element (a, button, .card, sidebar/nav links, TOC links, pagination) transitions color, background, border, shadow, and transform over --shumoul-transition-fast — subtle enough not to feel sluggish, present enough to feel deliberate. prefers-reduced-motion: reduce collapses every transition to near-zero duration site-wide, satisfying the "never distracting" requirement for users who've opted out of motion.

Where this is defined

src/css/custom.css — spacing and radius tokens are declared once in :root and referenced everywhere via var(--shumoul-space-N) / var(--shumoul-radius-*). Never hardcode a border-radius or spacing value in a component file.