# eis-ds > eis-ds is a visual design system in plain HTML and CSS: tokens (colour, type, space, shape), basic elements and scope components. A page links one CSS file and builds with native HTML and `eis-` classes. Light mode only. This file is for LLMs and agents that build pages with eis-ds. Read the manual before you write HTML or CSS, and apply it literally. For the full manual in one file, read [llms-full.txt](https://diegoeis.github.io/eis-ds/llms-full.txt). To match a pinned release, read the same file from the tag: `https://raw.githubusercontent.com/diegoeis/eis-ds//llms-full.txt`. Load one scope. Do not load a separate font link: - Web scope (websites, landing pages, documentation): `https://diegoeis.github.io/eis-ds/dist/eis-web.min.css` - App scope (dashboards, tools, system screens): `https://diegoeis.github.io/eis-ds/dist/eis-app.min.css` Rules that have no exceptions: - Use only the shared classes and the classes of your scope (`eis-web-*` or `eis-app-*`). Never mix scopes. - Your own CSS holds layout only. Do not restyle an eis-ds element. Do not write CSS that eis-ds already covers. - Use no raw values for colour, type, space or radius. Use the tokens. The manual lists the few allowed exceptions. - Use semantic HTML and native controls: `table`, `button`, `a`, `input`, `select`, `details`, `fieldset`. Never make a control or a table from `div` or `span`. - A variant changes colour only. A size (`--sm`, `--lg`) changes size only. - A panel holds only its parts: `eis-panel__head`, `eis-panel__body` (the `id` of a script goes on it), an optional `eis-panel__footer`, or a full-width part the manual lists (table, list, disclosure, metrics). No wrapper between the panel and its parts. Never an `eis-panel__body` inside another one. The Save of a settings panel goes in its footer. - Use the accent once per piece, on 5% of the area or less. - Every piece works from 360px to wide screens, with no horizontal scroll. - Before you finish, check the piece against the checklist. ## Manual ### Manual overview Source: https://diegoeis.github.io/eis-ds/docs/manual/AGENTS.md #### eis-ds manual The usage manual of the design system. Written to be applied literally by people and by LLMs: every rule is a "use / don't use", every element has HTML to copy. Read these files in this order before you build anything: | File | Answers | |---|---| | [`tokens-usage.md`](https://diegoeis.github.io/eis-ds/docs/manual/tokens-usage.md) | Which variable do I use for this colour, size, space, radius or line? | | [`elements.md`](https://diegoeis.github.io/eis-ds/docs/manual/elements.md) | What HTML and classes make a button, chip, field, table, panel…? Which variant? | | [`layout.md`](https://diegoeis.github.io/eis-ds/docs/manual/layout.md) | How do I set up a page: files to load, page skeleton, grids, responsiveness, scopes (shared, web, app)? | | [`checklist.md`](https://diegoeis.github.io/eis-ds/docs/manual/checklist.md) | What must be true before a piece is done? | Related, not part of the manual: - `docs/tokens.md` — how tokens are **written** (W3C DTCG format). Read it only when adding or changing a token. - `docs/visual-guidance/visual-guidance.md` — where the visual direction came from, and the decision log. Read it to understand *why*. This manual says *what*. - `site/` (at the repository root) — the visual manual for humans: this manual applied and rendered. Start at `site/foundations.html`. The tokens and the CSS live in `src/`: `shared/`, `web/` and `app/` (see `layout.md` §7). When the manual and the CSS disagree, the CSS in `src/css/` wins. Then fix the manual. For LLMs outside this repository, the site publishes the manual as one file: https://diegoeis.github.io/eis-ds/llms-full.txt. `scripts/build-llms.py` generates it from this folder and `llms.txt`. A new file in this folder needs a link in `llms.txt`. The script also copies the section "Rules with no exceptions" below into `llms.txt`. Change the rules here, never in `llms.txt`. ##### Rules with no exceptions The other files of this manual give the details of each rule. - Use only the shared classes and the classes of your scope (`eis-web-*` or `eis-app-*`). Never mix scopes. - Your own CSS holds layout only. Do not restyle an eis-ds element. Do not write CSS that eis-ds already covers. - Use no raw values for colour, type, space or radius. Use the tokens. The manual lists the few allowed exceptions. - Use semantic HTML and native controls: `table`, `button`, `a`, `input`, `select`, `details`, `fieldset`. Never make a control or a table from `div` or `span`. - A variant changes colour only. A size (`--sm`, `--lg`) changes size only. - A panel holds only its parts: `eis-panel__head`, `eis-panel__body` (the `id` of a script goes on it), an optional `eis-panel__footer`, or a full-width part the manual lists (table, list, disclosure, metrics). No wrapper between the panel and its parts. Never an `eis-panel__body` inside another one. The Save of a settings panel goes in its footer. - Use the accent once per piece, on 5% of the area or less. - Every piece works from 360px to wide screens, with no horizontal scroll. - Before you finish, check the piece against the checklist. ##### Conventions used in this manual - **MUST / MUST NOT** — no exceptions. - **Prefer** — the default. Deviate only for a reason you can state. - Code blocks are copy-ready. Replace only the text and the `id`/`for` values. - This manual writes variable names without `var()`: `--ink` means `var(--ink)`. --- ### Tokens: usage Source: https://diegoeis.github.io/eis-ds/docs/manual/tokens-usage.md #### Tokens: usage Which variable to use for what. Shared variables come from `src/shared/css/tokens.css`. Scope variables (`--web-*`, `--app-*`) come from `src//css/tokens.css`. All are generated — never edit them. **Two layers.** - **Semantic roles** (`--surface-*`, `--ink*`, `--line`, `--accent*`) carry meaning and will change between modes (dark, paper). For backgrounds, text, lines and the accent colour you **MUST** use the role, never the primitive behind it. - **Primitives** (`--color-*`, `--space-*`, `--radius-*`, `--border-*`, `--font-*`): use them directly for everything that has no role: spacing, radii, type sizes and weights, and the grey ramp for data. **No raw values.** You MUST NOT write a hex, rgb, px font size, px spacing or radius in piece CSS. If a value is missing, the token is missing: add it (see `docs/tokens.md`), don't hard-code it. [§8](#8-allowed-raw-values) lists the allowed exceptions. --- ##### 1. Colour roles | Variable | Value | Use for | MUST NOT | |---|---|---|---| | `--surface-canvas` | `#f7f7f7` | Page background. Hover background of secondary/ghost controls. Background of an open disclosure summary. | Use as a card or panel background. | | `--surface-raised` | `#ffffff` | Background of a default button: a control raised above the canvas. Same value as `--surface-panel` today, another role (see the note below the table). | Use for panels, cards or other page areas. It is not a third surface level. | | `--surface-panel` | `#ffffff` | Panels, the app sidebar, inputs, table backgrounds: the surface that holds content. The second and **last** surface level. | Stack a panel inside a panel to get a third level. Use a line instead. | | `--surface-inverse` | `#111111` | Primary and black buttons (`eis-button--primary`, `--black`), active nav item, solid chip. | Use for large areas. | | `--line` | `#cfcfcf` | **Every** border, divider and hairline: panels, table rows, separators, chip outlines. | Use `--ink` or any darker grey for borders of shapes, panels or cards. | | `--ink` | `#111111` | Primary text, headings, numbers, checked controls, focus outline. | — | | `--ink-muted` | `#6d6d6d` | Secondary text, metadata, placeholders, **outlines of interactive controls** (input, checkbox, radio, switch). 5.2:1 on panel, 4.8:1 on canvas, 4.5:1 on selected. | Use for decorative borders (that is `--line`). Put on `--surface-hover` (4.3:1) or `--surface-head` (3.8:1): both fail. | | `--ink-inverse` | `#f7f7f7` | Text on `--surface-inverse`. | Put on `--accent` (use `--accent-on`). | | `--accent` | `#f35919` | **Fills and marks** for the one thing that matters: overdue, conflict, urgent, record. | Use as text on light surfaces (3.1:1, fails). Decorate. Exceed ~5% of the visible area. | | `--accent-ink` | `#b5400c` | The accent **as text**: overdue dates, error messages, current breadcrumb item. 4.7:1 on canvas. | Use as a fill. | | `--accent-on` | `#111111` | Text and icons placed **on** a `--accent` fill. 5.6:1. | Use white on `--accent` (3.1:1, fails). | | `--success` | `#2a9d5c` | **Fills** for a positive state: done, saved, sent. Also the save button when the page needs one (`eis-button--success`). | Use as text on light surfaces (2.9:1, fails). Use it to decorate or to compete with the accent. | | `--success-ink` | `#16753f` | Success **as text**: "Saved", "Sent". 4.8:1 on canvas. | Use as a fill. | | `--success-on` | `#111111` | Text and icons **on** a `--success` fill. 5.5:1. | Use white on `--success` (3.5:1, fails). | | `--danger` | `#e5484d` | **Fill** of a danger button on hover. | Use as text (use `--danger-ink`), or to decorate. | | `--danger-ink` | `#b42318` | Danger **as text** and the line of a danger button. 6.6:1 on white. | Use as a fill. | | `--danger-on` | `#111111` | Text **on** a `--danger` fill. 4.8:1. | Use white on `--danger` (3.9:1, fails). | | `--surface-head` | `#dddddd` | Head strip of a panel. Text on it is `--ink` (13.9:1). `eis-mono` and an outline chip in the head take `--ink` by themselves. `eis-label` is always `--ink`. | Put `--ink-muted` on it (3.8:1, fails). Use as a page area. | | `--surface-selected` | `#f0f0f0` | Background of a selected table row: the row has `aria-selected="true"`. `eis-table` sets it. Every text role passes on it (`--ink` 16.6:1, `--ink-muted` 4.5:1, `--accent-ink` 5.0:1). | Use as a page area, a panel or a hover. | | `--surface-hover` | `#eaeaea` | Background of a closed disclosure summary under the pointer. `eis-disclosure` sets it. Text on it is `--ink` (15.7:1): `eis-mono` in the summary takes `--ink` on hover by itself. `eis-label` is always `--ink`. `--accent-ink` passes (4.7:1). | Put `--ink-muted` on it (4.3:1, fails). Use as a page area or a selected state. | **`--surface-panel` and `--surface-raised` have the same value today (white), with two roles.** `--surface-panel` is a surface that holds content (panel, sidebar, field, table). `--surface-raised` is a control raised above the canvas (the default button). Keep both: a mode (dark, paper) can give them different values. Use the role of the job, never the one with the right colour. ###### Accent budget - One accent per piece. If two things compete for it, one of them is not important. - Small state marks do not count for this rule: a count badge (`eis-app-nav__count--accent`), an overdue dot, a due date in `--accent-ink`. They can be on the same piece as the one accent action. - Accent covers ≤ 5% of the area. Exception: one "accent block" (a whole section in `--accent`) per page, declared on purpose. - Normal data is grey. Accent marks only the exception. ###### Pairing quick-reference | Background | Text | Secondary text | Accent text | |---|---|---|---| | `--surface-canvas` | `--ink` | `--ink-muted` | `--accent-ink` | | `--surface-panel` | `--ink` | `--ink-muted` | `--accent-ink` | | `--surface-selected` | `--ink` | `--ink-muted` | `--accent-ink` | | `--surface-hover` | `--ink` | — (use `--ink`) | `--accent-ink` | | `--surface-inverse` | `--ink-inverse` | — | — | | `--accent` | `--accent-on` | — | — | | `--success` | `--success-on` | — | — | Any other pair MUST be measured (WCAG 2.1: 4.5:1 text, 3:1 large text and UI graphics) before use. ##### 2. Neutral primitives Use the role above whenever one exists. Use these primitives directly **only** for data visualisation and the cases listed. | Variable | Value | Direct use allowed for | |---|---|---| | `--color-white` | `#ffffff` | — (use `--surface-panel` / `--surface-raised`) | | `--color-neutral-0` | `#f7f7f7` | — (use `--surface-canvas` / `--ink-inverse`) | | `--color-neutral-50` | `#f0f0f0` | — (use `--surface-selected`) | | `--color-neutral-100` | `#eaeaea` | — (use `--surface-hover`) | | `--color-neutral-200` | `#dddddd` | Data ramp, lowest step. | | `--color-neutral-300` | `#cfcfcf` | Data ramp. (As a border, use `--line`.) | | `--color-neutral-400` | `#a3a3a3` | Data ramp. | | `--color-neutral-500` | `#858585` | Data ramp. Icons and non-text graphics (3.4:1 on panel). Section labels in the app sidebar (`.eis-app-sidebar .eis-label`, author's choice). Never body text. | | `--color-neutral-600` | `#6d6d6d` | Data ramp. (As text, use `--ink-muted`.) | | `--color-neutral-900` | `#111111` | Data ramp, highest step. (As text, use `--ink`.) | ###### Data ramp Ordinal data (age, volume, intensity) goes from light to dark, low to high: `--color-neutral-200` → `300` → `400` → `500` → `600` → `900`, and `--accent` for the exception (overdue, anomaly). - Use as many steps as there are buckets, keeping the order. With fewer than 6 buckets, prefer skipping steps so neighbours differ more (e.g. 4 buckets: `200 · 400 · 600 · 900`). - `200` and `300` are close (1.15:1). Don't put them next to each other when the difference matters. - No hues for data. Status colours: `--success` (green) for a positive state, `--danger` (red) only on a remove/delete button. The accent still marks problems. ###### Category colours Seven hues tell groups apart: a team, a project, a topic, a calendar type. They are not data values and not states. Use them directly, as primitives. | Variable | Value | `--ink` on it | Pastel tone | `--ink` on pastel | |---|---|---|---|---| | `--color-pink` | `#ff6a8c` | 6.9:1 | `#ffb4c6` | 11.3:1 | | `--color-terracotta` | `#e8906e` | 7.8:1 | `#f4c8b6` | 12.4:1 | | `--color-yellow` | `#ffd966` | 13.8:1 | `#ffecb2` | 16.1:1 | | `--color-green` | `#98d9a4` | 11.5:1 | `#ccecd2` | 14.8:1 | | `--color-aqua` | `#7fcfd0` | 10.6:1 | `#bfe7e8` | 14.2:1 | | `--color-blue` | `#9db4ff` | 9.4:1 | `#cedaff` | 13.6:1 | | `--color-lilac` | `#c3a6f2` | 9.0:1 | `#e1d2f8` | 13.3:1 | | `--color-pastel` | `0.5` | — | — | — | - The pastel tone is not a token. Mix the hue with white at `--color-pastel`: `color-mix(in srgb, var(--color-blue) calc(var(--color-pastel) * 100%), var(--color-white))`. On a chip, add `eis-chip--pastel` instead. - `--color-green` is the green category. `--color-green-500` and `--color-green-700` are the success colours. Do not use one for the other. - Text and icons on a category colour are `--ink`. `--ink-muted` fails on some of them (1.9:1 on pink). White fails on all of them. - Use: chip fills, tag and legend dots, calendar events, illustration. - Do not use: as text, as a page or panel surface, for a state (use `--accent`, `--success`, `--danger`), for ordinal data (use the data ramp). - The fills are light. They do not reach 3:1 against the canvas (pastel yellow is 1.1:1). The text inside carries the meaning, so this is correct for a chip. A shape with no text in a category colour needs a `--line` border. ##### 3. Space Seven steps, each double the previous. Each has a job. Pick by job, not by eye. | Variable | Value | Job | |---|---|---| | `--space-100` | 8px | **Inside a component**: icon ↔ label, gap between chips, label ↔ field, field ↔ hint. | | `--space-200` | 16px | **Between siblings**: panel padding, table cell padding, list rows, gap between panels in a grid. | | `--space-300` | 32px | **Between blocks**: page padding (desktop), gap between page regions, title ↔ content of a section. | | `--space-400` | 64px | **Between sections**: large section gaps on documentation and marketing pages. | | `--space-500` | 128px | **Large layout**: space around a hero or a page opening. | | `--space-600` | 256px | **Large layout**: offsets on wide marketing pages. | | `--space-700` | 512px | **Large layout**: the largest offset on wide marketing pages. | - Use the half step `calc(--space-100 / 2)` (4px) only in dense data: cell grids, tabs padding, list item gaps. - Mobile page padding drops one step (`--space-300` → `--space-200`). - Use `--space-500` to `--space-700` only in page layout on wide screens. Never use them inside a component. Below 1024px, drop them to `--space-400` or less. ###### Width Five fixed widths for a field or a block, used through the width helpers (`eis-width-100` … `eis-width-500`, `eis-width-fit` for "as wide as the content"; see elements.md, "Labels and helpers"). Pick the smallest that fits the longest value the field holds. In a row of fields (`eis-app-add-bar`, `eis-app-form-row`, `eis-app-filters__fields`) the step is the base and the minimum width of the field: it grows into the free room, and wraps when it no longer fits (layout.md §7, "Rows of fields"). | Variable | Value | Job | |---|---|---| | `--width-100` | 128px | A short value: a number, a date, a status select | | `--width-200` | 192px | A word or two: a type, a name | | `--width-300` | 256px | A short line: a title, an e-mail | | `--width-400` | 360px | A path, a URL | | `--width-500` | 480px | A long line | ##### 4. Radius and line | Variable | Value | Use for | |---|---|---| | `--radius-100` | 7px | Buttons, inputs, selects, tabs, nav items, small boxes. | | `--radius-200` | 10px | Panels. | | `--radius-300` | 15px | Large surfaces: a card that stands alone, a dialog. | | `--radius-400` | 20px | The largest surfaces: sheets, hero blocks. | | `--radius-full` | 999px | Chips, switch, avatar, pills. | Nested corners: an element inside a rounded box with padding uses the box radius minus the padding, so the curves stay parallel. | `--border-width-100` | 1px | **The only line weight.** Every border and divider. | - Only the focus outline uses 2px. - No shadows. The only exception is the button hover glow (defined in `elements.css`), never at rest. ##### 5. Type Two voices. **Sans** (`--font-family-sans`, Geist) speaks text. **Mono** (`--font-family-mono`, Geist Mono) speaks for the instrument: labels, numbers, dates, codes, sources, navigation, buttons. ###### Text styles — prefer these Apply with the class (`.eis-type-*`) or the per-property variables (`--type- ``` - `` is the relative path to the `src/` folder at the repository root. From `site/examples//` it is `../../../src`. - `` is `web` (websites, landing pages, docs) or `app` (dashboards, tools). See §7. - In a project outside this repository, link `dist/eis-.min.css` instead: one minified file with the same content and no chained imports. It is generated by `scripts/build-css.py`. - `.css` is the only stylesheet to link. It imports `../shared/shared.css` (fonts, shared tokens, base, elements), then the scope tokens and components. Keep `shared/` next to the scope folder. The preconnect lines are optional: they make the fonts load faster. - `shared.css` imports the fonts, the shared tokens, the base and the elements. The base already sets box-sizing, margins, body type, canvas background and focus. Don't repeat it. - The piece's `