package page→ /design/keer-style.md
pages/design/keer-style.md
63 lines, 4.9 KB. As a page.
- ---
- type: Page
- title: "The keer-style style"
- description: "A graphite-and-champagne style: \"Draft, graphite, champagne\". Tokens, principles, when to apply what, showcases."
- icon: "🎨"
- ignore: []
- ---
- # The keer-style style
- This is a calm graphite-and-champagne style. It is taken from an earlier product (design code, 28.11.2026) and suits any project: a web application, an HTML page, a report, a lens.
- All values are in one file, [tokens.css](keer-style/tokens.css). Elements in plain CSS are in [elements.css](keer-style/elements.css). Examples are in two showcases: [showcase.html](keer-style/showcase.html) (buttons, cards, fields, a table, badges, empty states) and [tokens.html](keer-style/tokens.html) (all tokens by group). Both open with a double click.
- ## The formula in one phrase
- Quiet gray paper, a graphite primary button, hairline borders instead of frames, a card corner radius of 8 px, soft shadows. Color only by role, text only in named styles, states always with the same techniques.
- ## Principles
- 1. **Tokens only.** Color, corner radius, shadow, spacing, font and motion are taken from `var(--ds-…)`. There are no raw values in pages and components. If you need a new value, first a token in `tokens.css`, then the use.
- 2. **Color by role, not by palette.** The background is `--ds-bg`, a card is `--ds-bg-raised`, text is `--ds-text-primary` and `--ds-text-secondary`, a border is `--ds-border-primary`. A state is shown with a badge (`--ds-tone-*`), not with text color.
- 3. **One primary button in an area.** The primary one is graphite with a light tone transition (`--ds-button-gradient`). The others are outline, secondary, quiet. A dangerous action comes with a confirmation.
- 4. **Hairlines.** Borders are semi-transparent ink (`--ds-border-*`, `--ds-shadow-hair`). There are no solid gray frames.
- 5. **A scale, not "by eye".** Spacing is a 4 px step (`--ds-space-*`). Corner radii are xs 4, sm 5, md 6 (fields), lg and xl 8 (buttons, cards), round (badges and avatars). Shadows are control, card, soft, popover, overlay, primary.
- 6. **Named text styles.** Page title, section, card title, body text, caption, uppercase label, voice (a serif for agent output). The interface font is Geist if loaded; otherwise the system font.
- 7. **The same states.** Loading is a skeleton of the same shape as the data. Empty is an icon, one phrase and an action. An error says what happened and what was saved. No access, a limit, waiting are also handled with one technique across the product.
- 8. **Task screen layout.** On the left the progress and the result, on the right the details: three fifths and two fifths; narrower than 1024 px, one column.
- 9. **Two themes, no dark mode.** "Draft" is the default. "Grain" (a white backing, a gray panel) is turned on with the attribute `data-theme="grain"` on `<html>` or on any block.
- 10. **Motion is short.** 100–200 ms, `--ds-motion-*`; with `prefers-reduced-motion` there are no animations.
- ## When to apply what
- | Need | Take |
- |---|---|
- | Background of a page, cards, a side panel | `--ds-bg`, `--ds-bg-raised`, `--ds-bg-sidebar` |
- | Hover and press | `--ds-wash-hover`, `--ds-wash-pressed` |
- | Primary, secondary text, a hint | `--ds-text-primary`, `--ds-text-secondary`, `--ds-text-tertiary` |
- | Border of a card, a field | `--ds-shadow-hair`, `--ds-border-strong` |
- | A state badge | `--ds-tone-{blue,green,amber,red,neutral}-{fg,bg}` |
- | Error, warning, success | `--ds-danger*`, `--ds-warning*`, `--ds-success` |
- | "Waiting for you" | `--ds-needs-you` (champagne) |
- | A card | `--ds-radius-xl` + `--ds-shadow-hair`, `--ds-shadow-card` |
- | A popup menu, a dialog | `--ds-shadow-popover`, `--ds-shadow-overlay` |
- | Height of a button and a field | `--ds-control-height` (36 px), small is `--ds-control-height-sm` |
- ## How to connect it
- - HTML without a build: `<link rel="stylesheet" href="design/keer-style/tokens.css">` and, if you need ready elements, `elements.css` with the classes `ks-…`.
- - An application on React and Tailwind: the `keer-ui` package, a component library on these same tokens.
- - Your own CSS: `@import` the tokens file and only `var(--ds-…)` in rules.
- ## Norms
- - [KS-R01](/norms/rules/keer-style/KS-R01.md): color only from tokens.
- - [KS-R02](/norms/rules/keer-style/KS-R02.md): corner radius only from the scale.
- - [KS-R03](/norms/rules/keer-style/KS-R03.md): shadow only from tokens.
- The checks look at the project's CSS, HTML and code (TSX, JSX, TS, JS, Vue, Svelte). They do not look at: hidden folders, `node_modules` and build folders, files marked `@tokens` in the first lines (a value file), lines marked `keer-style: allow`. Your own exceptions are paths in the `ignore:` field of this page, for example `ignore: [legacy/, "*.min.css"]`.
- ## Source
- An earlier product: `shtuks/design/` (the formula, the layer standard V1–V12, collections of colors, corner radii, shadows, spacing, typography) and `packages/ui/src/styles/tokens.css`. Values and principles were carried over; domain screens and collection records were not.