Change Proposal: Make the border tokens translucent so they keep their contrast on any elevation

Aperta
#388 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, react, typescript
Ambito
design, frontend

Direzione di ricerca

The three tokens are CSS custom properties, so start by finding where --ds-border-subtle, --ds-border-emphasis and --ds-border-strong are declared for light and dark modes in the theme source, then grep for the same names to see which components and stories consume them. Compare the exact rgba values in the table against the linked Figma before editing, since this changes the format from hex to rgba(). Done means both modes resolve to the new values, and any visual/snapshot tests and token documentation are updated to match.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

What is being proposed?

--ds-border-subtle, --ds-border-emphasis and --ds-border-strong get a fixed opacity, in light and dark, instead of solid hex colours. Because they are translucent, they get darker (light mode) or lighter (dark mode) along with the surface behind them.

Why is this needed?

The solid borders were picked to look right on lighter shades in light mode, and equivalent in dark mode. Elevation steps change the surface, but not the border, so the border drifts toward the background colour. It is now more obvious as elevation gets more prominence in light mode.

image image

https://www.figma.com/design/cHOLtwE7iIe27tui6syQmv/DiamondDS-borders--solid-vs-alpha?node-id=0-1&t=8bjw7T0LShIx96hZ-1

What will change?

Token Light Dark
--ds-border-subtle rgba(26, 28, 35, 0.12) rgba(232, 234, 240, 0.15)
--ds-border-emphasis rgba(26, 28, 35, 0.27) rgba(232, 234, 240, 0.30)
--ds-border-strong rgba(26, 28, 35, 0.40) rgba(232, 234, 240, 0.55)

Breaking change?

  • x Yes

Visible, and a change in token format: borders shift slightly in shade, and the three tokens change from hex to rgba(). Consumers that read them as hex strings, or use the subtle channel as the old grey, would be affected.

Next steps

A maintainer will review this issue.
If accepted, it will be marked as accepted and a PR may then be opened.

Lingua principale
TypeScript
Stelle
9
Fork
4
Merge medio
4g 18h
PR unite (30g)
10

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 DiamondLightSource/sci-react-ui

Tutte le issue di DiamondLightSource/sci-react-ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.