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

Offen
#388 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
42/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
css, react, typescript
Bereich
design, frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
9
Forks
4
Ø Merge
4 T. 18 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DiamondLightSource/sci-react-ui

Alle Issues in DiamondLightSource/sci-react-ui

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.