Design tokens: danger/mention red, visible hover, dimmer secondary text, motion, shadows, z-index, type #282

Closed
opened 2026-10-07 20:43:01 -04:00 by Salastil · 2 comments
Owner

The token set in theme.css (lines 7-103) is missing whole categories, and app.css works around it with literals:

  • Hover/selected: --surface-hover is rgba(66,71,78,0.08) - about 3 RGB levels on the sidebar, practically invisible. --surface-pressed/--surface-selected are defined but used 0 times. Hover is done three different ways.
  • No red: --error is pale pink; reds are hard-coded as #c9403c, #da373c, #f23f43, #a12828.
  • Secondary text (.muted #c2c7cf) is nearly as bright as body text (#e0e2e8); Discord's timestamps are ~#949ba4.
  • No motion tokens: 17 transitions with 9 different durations; 7 separate reduced-motion blocks that miss several animations.
  • No shadow tokens: 28 distinct shadow recipes. No z-index scale: 13 values (e.g. .modal-scrim 60 sits below .verification-dialog 70 and .lightbox-backdrop 200).
  • Literals: 22 border-radius values (10 literal px), 19 font sizes (12 literal px, including 12/14/16/20 that have tokens), 11 off-scale spacing values, 22 hex + 14 rgba colours (the call stage uses Discord's palette directly), 14 duplicate selectors, dead rules (.account-header, .group-header, .bufferlist-footer, .footer-button, .settings-rail-item.soon).
  • Icons: --icon-size* unused; about 10 literal icon sizes; opsz fixed at 24, so small glyphs render thin.

Fix: add --danger, --mention, --mention-row (amber), visible --surface-hover/--surface-selected, --text-muted, --motion-fast/--motion/--motion-slow/--ease, --shadow-1..3, a --z-* scale, --radius-pill, --font-size-xs, weight tokens; one global reduced-motion rule; replace literals; remove duplicates and dead CSS; a global :focus-visible ring; Icon matches opsz to size.

Part of the v1.0 UI pass.

The token set in `theme.css` (lines 7-103) is missing whole categories, and `app.css` works around it with literals: - **Hover/selected:** `--surface-hover` is `rgba(66,71,78,0.08)` - about 3 RGB levels on the sidebar, practically invisible. `--surface-pressed`/`--surface-selected` are defined but used 0 times. Hover is done three different ways. - **No red:** `--error` is pale pink; reds are hard-coded as `#c9403c`, `#da373c`, `#f23f43`, `#a12828`. - **Secondary text** (`.muted` #c2c7cf) is nearly as bright as body text (#e0e2e8); Discord's timestamps are ~#949ba4. - **No motion tokens:** 17 transitions with 9 different durations; 7 separate reduced-motion blocks that miss several animations. - **No shadow tokens:** 28 distinct shadow recipes. **No z-index scale:** 13 values (e.g. `.modal-scrim` 60 sits below `.verification-dialog` 70 and `.lightbox-backdrop` 200). - **Literals:** 22 border-radius values (10 literal px), 19 font sizes (12 literal px, including 12/14/16/20 that have tokens), 11 off-scale spacing values, 22 hex + 14 rgba colours (the call stage uses Discord's palette directly), 14 duplicate selectors, dead rules (`.account-header`, `.group-header`, `.bufferlist-footer`, `.footer-button`, `.settings-rail-item.soon`). - Icons: `--icon-size*` unused; about 10 literal icon sizes; `opsz` fixed at 24, so small glyphs render thin. **Fix:** add `--danger`, `--mention`, `--mention-row` (amber), visible `--surface-hover`/`--surface-selected`, `--text-muted`, `--motion-fast/--motion/--motion-slow/--ease`, `--shadow-1..3`, a `--z-*` scale, `--radius-pill`, `--font-size-xs`, weight tokens; one global reduced-motion rule; replace literals; remove duplicates and dead CSS; a global `:focus-visible` ring; `Icon` matches `opsz` to size. _Part of the v1.0 UI pass._
Salastil added this to the v1.0 milestone 2026-10-07 20:43:01 -04:00
Salastil added the feature label 2026-10-07 20:43:01 -04:00
Author
Owner

Before and after, captured by scripts/ui-shots.mjs from an isolated copy of the app (before = 88375ba, after = 3cdfe37). The token work is 9db25c8 (theme.css) and 3cdfe37 (the stylesheet pass).

Hover over a channel

Hover over a channel

--surface-hover was about 3 RGB levels off the sidebar; the pointer over dev is now clearly visible, and the selected row (general) is unchanged.

Hover over a member

Hover over a member

Same fill on the member list.

Whole IRC channel, Comfy

Whole IRC channel, Comfy

Timestamps and the join/part lines use the quieter muted colour; everything else looks the same, which is the intent of a token pass.

Discord-shaped guild

Discord-shaped guild

Same screen with the new tokens; the mention badge is still blue here because switching it to red is #284.

What changed: theme.css gained visible hover/pressed/selected fills, a real red and an amber mention tint, a quieter text colour, motion, shadow, z-index, radius, font-size and weight tokens, a keyboard focus ring and one reduced-motion rule. app.css now uses them for colours (35 shadows collapsed to 4, 16 layers named, 18 transitions on 3 durations, 55+ font-weights, radii and sizes), the status dot / voice level classes no longer collide with the avatar dot and the voice recorder, dead rules are gone, and Icon draws glyphs at their own optical size.

Not done: the call stage's Discord-brand colours (#5865f2, #2b2d31, ...) are left as they are - they are that screen's own look. Duplicate rules whose order matters (.message-row, .emoji-empty) were left alone rather than risk changing the cascade; they are harmless.

Motion: the transitions now use the shared durations but nothing new animates yet; that is #283.

Before and after, captured by `scripts/ui-shots.mjs` from an isolated copy of the app (before = `88375ba`, after = `3cdfe37`). The token work is `9db25c8` (theme.css) and `3cdfe37` (the stylesheet pass). **Hover over a channel** ![Hover over a channel](https://git.salastil.com/attachments/b0b2763a-cbdd-4157-b363-8c539ab047f4) `--surface-hover` was about 3 RGB levels off the sidebar; the pointer over `dev` is now clearly visible, and the selected row (`general`) is unchanged. **Hover over a member** ![Hover over a member](https://git.salastil.com/attachments/680b97eb-8f9c-4a86-9ada-9685d9043ed0) Same fill on the member list. **Whole IRC channel, Comfy** ![Whole IRC channel, Comfy](https://git.salastil.com/attachments/ff1ac033-2a66-4441-a299-28b4bd5bf7d3) Timestamps and the join/part lines use the quieter muted colour; everything else looks the same, which is the intent of a token pass. **Discord-shaped guild** ![Discord-shaped guild](https://git.salastil.com/attachments/d88fed6e-30b8-454c-b318-ab217f90378d) Same screen with the new tokens; the mention badge is still blue here because switching it to red is #284. **What changed:** `theme.css` gained visible hover/pressed/selected fills, a real red and an amber mention tint, a quieter text colour, motion, shadow, z-index, radius, font-size and weight tokens, a keyboard focus ring and one reduced-motion rule. `app.css` now uses them for colours (35 shadows collapsed to 4, 16 layers named, 18 transitions on 3 durations, 55+ font-weights, radii and sizes), the status dot / voice level classes no longer collide with the avatar dot and the voice recorder, dead rules are gone, and `Icon` draws glyphs at their own optical size. **Not done:** the call stage's Discord-brand colours (`#5865f2`, `#2b2d31`, ...) are left as they are - they are that screen's own look. Duplicate rules whose order matters (`.message-row`, `.emoji-empty`) were left alone rather than risk changing the cascade; they are harmless. **Motion:** the transitions now use the shared durations but nothing new animates yet; that is #283.
Author
Owner

Finished: 9db25c8, 3cdfe37. Before/after above.

Finished: [9db25c8](https://git.salastil.com/Salastil/moho/commit/9db25c8d73a9b80332ba69602d8ce5936771d41b), [3cdfe37](https://git.salastil.com/Salastil/moho/commit/3cdfe37c6ff5000e3795ea28f8d12999ba1df873). Before/after above.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#282