Docs
Customization
Tune color, type, spacing, and radius tokens.
EldanDocs is styled by EldanCSS, which exposes a small token layer. Override the values after the stylesheet loads, or edit them in your own site CSS.
Color
The palette is generated from --hue and --saturation. --hue shifts the accent and surface family; --saturation is a 0–1 multiplier. At 0, the palette becomes grayscale and accent lightness is lowered to preserve contrast.
Drag either slider to retint this documentation. Saturation 0 produces an accessible grayscale palette. Reset restores hue 241 and saturation 100%. The snippet below updates to match, ready to copy.
Copy this CSS
:root {
--hue: 241;
--saturation: 1;
}The palette inputs are:
| Token | Purpose |
|---|---|
--hue | Base hue, 0–360 |
--saturation | Saturation multiplier, 0–1; 0 is grayscale |
For finer control, override the individual color tokens:
| Token | Purpose |
|---|---|
--color-bg | Page background |
--color-surface | Inputs, articles, and details |
--color-text | Body and heading text |
--color-muted | Secondary text and markers |
--color-border | Dividers and control borders |
--color-accent | Links, buttons, focus rings, and selections |
--color-accent-hover | Hover state for accent surfaces |
--color-on-accent | Text placed on the accent color |
--color-code | Inline code and code block background |
--color-danger | Invalid form controls |
Forced schemes
Each token is declared with light-dark() and color-scheme: light dark, so the active scheme follows prefers-color-scheme unless a root selector forces one. Override tokens per scheme with an attribute selector:
:root[data-theme="light"] {
--color-bg: hsl(200 20% 98%);
}
:root[data-theme="dark"] {
--color-bg: hsl(200 20% 8%);
--color-accent: hsl(200 75% 72%);
}
When no data-theme is present, target @media (prefers-color-scheme: dark) instead.
Type and spacing
| Token | Purpose |
|---|---|
--font-sans | System sans stack for body text |
--font-serif | Readable ebook serif stack for body text |
--font-mono | Code and labels |
--font-humanist | Humanist sans alternative |
--font-neo-grotesque | Neo-Grotesque sans alternative |
--font-industrial | Industrial condensed sans, used by headings |
--font-body | Body stack (defaults to --font-sans) |
--font-heading | Heading stack (defaults to --font-industrial) |
--tracking-heading | Letter spacing for headings |
--tracking-h1 | Letter spacing for h1 |
--measure | Maximum body width |
--text-base | Base font size |
--leading | Body line height |
--h1 … --h6 | Heading sizes |
--space-1 … --space-8 | Spacing scale |
--control-y, --control-x | Padding inside form controls |
--button-y, --button-x | Padding inside buttons |
--cell-y, --cell-x | Table cell padding |
Headings default to Industrial, a condensed sans stack. The body defaults to the system sans stack. Both are plain system stacks, so there is still no webfont download.
:root {
--font-heading: var(--font-industrial);
--tracking-heading: -0.02em;
--tracking-h1: -0.03em;
--font-body: var(--font-sans);
}
Set --font-heading to var(--font-sans), var(--font-mono), var(--font-humanist), or var(--font-neo-grotesque) for other heading voices. Set --font-body to var(--font-serif) for a general ebook serif built from Charter, Sitka Text, Cambria, and Georgia. To use a serif for both, set both roles to the same stack.
The named stacks are based on Modern Font Stacks , with extra fallbacks for Windows and Linux. Pick a combination below to preview it on this page; the snippet follows along, ready to copy.
Heading 3 Example
Body text sits at a comfortable measure with generous line height. The quick brown fox jumps over the lazy dog, then settles in for a long read.
Strong, emphasis, and links keep the same rhythm in every stack.
Copy this CSS
:root {
--font-heading: var(--font-industrial);
--tracking-heading: -0.02em;
--tracking-h1: -0.03em;
--font-body: var(--font-sans);
}The size and spacing tokens still apply independently:
:root {
--measure: 72ch;
--radius: 0.2rem;
--h1: clamp(2rem, 1.5rem + 2.5vw, 3rem);
}
Borders
--radius controls the small radius used by controls, code, and articles. --radius-lg is used for dialogs, popovers, and larger surfaces.
:root {
--radius: 0.25rem;
--radius-lg: 0.5rem;
}