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

Aberta
#388 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
Meio dia
Facilidade para iniciantes
42/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
css, react, typescript
Domínio
design, frontend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
9
Forks
4
Merge médio
4d 18h
PRs com merge (30d)
10

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DiamondLightSource/sci-react-ui

Todas as issues de DiamondLightSource/sci-react-ui

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.