Add shared dark-surface color tokens to theme-styles.ts

Aperta
#66 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@jbuckner ci sta già lavorando.

Dal 20/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Problem

The house palette in src/themes/theme-styles.ts is light-theme oriented — --primary-text-color (dark-gray) sits on --primary-background-color (off-white), and the darkest base color is --dark-gray (#2c2c2c). Dark-surface components can't consume the semantic tokens without inverting them, so they carry local hex defaults instead.

Surfaced during the item-navigator migration (PR #64). ia-item-navigator is a dark UI (white text/icons on near-black) and currently re-declares these hexes because the palette has no equivalent:

  • near-blacks #000, #151515, #212121 (theater / embed field / drawer)
  • border #4b4b4b — sits between --mid-gray (#333) and --light-gray (#666)
  • active-file highlight #538bc5 — neither --navy-blue (#194880) nor --bright-blue (#4b64ff)
  • translucent overlays rgba(255,255,255,.1) / rgba(255,255,255,.05), scrim rgba(0,0,0,.7)

Sibling elements components (ia-button, ia-otp, ia-status-indicator) all consume the semantic tokens; none reference raw base names. Dark components have no such path today.

Proposal

  • Add a small set of shared dark-surface base tokens to theme-styles.ts (e.g. --surface-dark-1/2/3 for the near-black ladder, --border-dark, a --scrim, and an overlay-hover token for the translucent whites).
  • Optionally expose matching semantic/adjustable tokens (--ia-theme-* fallbacks) consistent with the existing convention.
  • Re-point ia-item-navigator's --item-navigator-* fallbacks at the new tokens, replacing the local hexes.

Out of scope

  • ia-item-navigator behavior or layout — this is palette infrastructure only.
  • The #538bc5 active-file blue can be revisited here (fold into a shared accent) or left as a component knob; call it out during design.

Tracking

Lingua principale
TypeScript
Stelle
18
Fork
5
Merge medio
1g 16h
PR unite (30g)
15

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di internetarchive/elements

Tutte le issue di internetarchive/elements

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.