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

Open Beginner friendly
#618 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, javascript, react
Domain
design, frontend

Research direction

Start with the React tab styles that set .pk-tab[aria-selected="true"]::after and trace how the existing tab tokens reach the PSU web component. Add support for --pk-tab-mark-color, defaulting to var(--pk-accent), and map it through the component. Done when hosts can set the selected mark color independently and the existing default is preserved.

Written by the indexing model from the issue text.

Description

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.

Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
3h 10m
Merged PRs (30d)
267

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eizedev/pivotkit

All issues in eizedev/pivotkit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.