Skip to content
EldanDocs

    Up/Down to navigate, Enter to open, Esc to close

    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.

    241
    100%
    accent
    hover
    code
    border
    surface
    danger

    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:

    TokenPurpose
    --hueBase hue, 0–360
    --saturationSaturation multiplier, 0–1; 0 is grayscale

    For finer control, override the individual color tokens:

    TokenPurpose
    --color-bgPage background
    --color-surfaceInputs, articles, and details
    --color-textBody and heading text
    --color-mutedSecondary text and markers
    --color-borderDividers and control borders
    --color-accentLinks, buttons, focus rings, and selections
    --color-accent-hoverHover state for accent surfaces
    --color-on-accentText placed on the accent color
    --color-codeInline code and code block background
    --color-dangerInvalid 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

    TokenPurpose
    --font-sansSystem sans stack for body text
    --font-serifReadable ebook serif stack for body text
    --font-monoCode and labels
    --font-humanistHumanist sans alternative
    --font-neo-grotesqueNeo-Grotesque sans alternative
    --font-industrialIndustrial condensed sans, used by headings
    --font-bodyBody stack (defaults to --font-sans)
    --font-headingHeading stack (defaults to --font-industrial)
    --tracking-headingLetter spacing for headings
    --tracking-h1Letter spacing for h1
    --measureMaximum body width
    --text-baseBase font size
    --leadingBody line height
    --h1 … --h6Heading sizes
    --space-1 … --space-8Spacing scale
    --control-y, --control-xPadding inside form controls
    --button-y, --button-xPadding inside buttons
    --cell-y, --cell-xTable 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;
    }