react: a token for the colour of the selected tab's mark

未关闭 适合新手
#618 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
css, javascript, react
领域
design, frontend

调研方向

从设置 .pk-tab[aria-selected="true"]::after 的 React 标签页样式入手,追踪现有标签页令牌如何传递到 PSU Web 组件。添加对 --pk-tab-mark-color 的支持,默认值为 var(--pk-accent),并通过组件映射该变量。完成标准是宿主可以独立设置选中标记的颜色,同时保留现有默认值。

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

描述

pivotkit-react 0.8.1 added tokens for the tabs (--pk-tab-bg, --pk-tab-text, --pk-tab-selected-bg, --pk-tab-selected-text) and the height of the selected tab's mark (--pk-tab-mark), but the mark's colour is still var(--pk-accent) (.pk-tab[aria-selected="true"]::after). A host theme that marks a selected tab with its brand colour, while keeping the general accent for links, chips and focus elsewhere, can set the tab's text but not its mark - it still needs a CSS rule on pivotkit's class names, which also does not reach into the web component's shadow root.

Proposal: --pk-tab-mark-color (default var(--pk-accent)), used by the selected tab's mark; the PSU component would map it like the other tab tokens.

主要语言
JavaScript
星标
1
派生
1
平均合并
3 小时 10 分钟
30 天内合并 PR
267

环境准备

从这里开始

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

eizedev/pivotkit 的其他 Issue

查看 eizedev/pivotkit 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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