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

Ouverte
#388 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
42/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
css, react, typescript
Domaine
design, frontend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
9
Forks
4
Merge moyen
4 j 18 h
PR mergées (30 j)
10

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DiamondLightSource/sci-react-ui

Toutes les issues de DiamondLightSource/sci-react-ui

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.