# Spacing

Source: https://ecosphere.dev/docs/foundations/spacing (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

Space, shape, elevation and motion tokens. Component rules write their paddings as literal px; these tokens are for your own layout glue.

## Gaps

gap-inline between controls in a row, gap-card between cards, gap-control above a control row, gap-section between sections.

16px between cards in a grid. Not used inside bundle.css — it is for your own layout glue.

32px between page sections. Not used inside bundle.css — it is for your own layout glue.

8px between controls in a row; used by `.filters`. The default gap for your own inline glue.

18px above a control row (`.filters` margin-top).

## Scale

The sp-2 … sp-80 steps.

## Layout constants

Designed at a desktop width of 1280px.

| Token | Value | Usage |
| --- | --- | --- |
| `--ring-w` | 3px | 3px focus-halo width. Not referenced — the width is baked into the `ring` shadow value. |
| `--ring-clear` | 6px | 6px of clearance kept around a focus halo. Not referenced by any rule. |
| `--sidebar-w` | 248px | Sidebar width: `.sidebar{width}` and the matching `.main{padding-left}`. |
| `--sidebar-w-min` | 64px | Collapsed rail width; `body[data-rail]` re-points `--sidebar-w` at it. |
| `--topbar-h` | 64px | `.topbar` height, and the top offset of `.notif` on narrow screens. |
| `--content-max` | 1400px | `max-width` of `.work`, the main content column. |
| `--page-x` | 32px | Horizontal page gutter: `.topbar`, `.work`, `.work__top`, `.listpane`, `.toasts`. |
| `--row-h` | 56px | Intended list-row height. `.listrow` hardcodes `height:56px` instead — use the token in new rows. |
| `--rail-w` | 346px | Right-hand rail width. Declared, not referenced by any rule. |
| `--charts-h` | 250px | Chart block height. Declared, not referenced by any rule. |
| `--recent-h` | 434px | Recent-list height. Declared, not referenced by any rule. |
| `--sidebar-w-collapsed` | 64px | Duplicate of `sidebar-w-min`; nothing reads it — prefer `sidebar-w-min`. |
| `--cut-r` | 16px | Cut-corner radius. Declared, not referenced by any rule. |
| `--tip-w` | 352px | Intended tooltip width; the tooltip caps itself at 240px, so nothing reads this. |

## Radius

An element with a coloured edge bar has no radius on that side.

6px — `.legend__row`, `.skel`.

10px — `.menu__opt`, `.nav-item`, `.tl__tile`, tooltips, the rail hover label, `.rangebtn`.

12px — `.listrow`, `.notice`, `.input`, `.msg__w`, `.railbtn`, `.toast`, `.nrow`, `.urow`, `.prow`.

18px — cards and panels: `.card`, `.panel`, `.menu`, `.taskrow`, `.taskrows`.

24px — large overlays: `.cmodal`, `.dlg`, `.drawer`, `.notif`, `.hero`.

999px — fully round: `.btn`, `.iconbtn`, `.badge`, `.score`, `.tag`, `.search__in`, `.pg`, `.finder`.

## Elevation

A resting card gets el-rest and nothing more — resting cards do not lift on hover.

The resting card shadow — `.card` only. Resting cards carry this and never lift on hover.

Floating layer: `.menu`, tooltips, `.toast`, `.notif`, the rail label, the mobile `.sidebar`.

Deep modal shadow: `.cmodal`, `.dlg`, `.drawer`.

Shadow for a dragged element. Declared, not referenced by any rule.

The violet focus halo on text controls: `.input:focus`, `.search__in:focus`, `.finder:focus-within`.

Red counterpart of `ring` for an invalid field. Declared, not referenced by any rule.

Blur behind the scrim of dialogs, drawers and the compose modal (backdrop-filter). 0px turns the frosted glass off.

## Motion

dur-hover for hover and colour, dur-state for panes and overlays, on ease-ui by default and ease-out for a surface that enters or slides. Hover a row to play it.

180ms — the default hover and colour transition, and the most-used motion token.

340ms — larger state changes: the split pane opening, modal, scrim, toast, drawer.

620ms for content entering. Declared, not referenced by any rule.

The default UI curve, paired with the duration tokens in every transition.

Curve for surfaces that enter or slide: `.detail__in`, `.profpane__in`, `.sidebar`, `.drawer`.
