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

未关闭
#388 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
42/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
css, react, typescript
领域
design, frontend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
9
派生
4
平均合并
4 天 18 小时
30 天内合并 PR
10

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DiamondLightSource/sci-react-ui 的其他 Issue

查看 DiamondLightSource/sci-react-ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。