Page MenuHomePhabricator

Define `accent-color` design token
Closed, ResolvedPublic

Description

Background/Goal

accent-color is a relative new CSS property that is probably the most design-system-ey CSS property of all.
It enables branding simplification on native HTML form elements like checkboxes or progress bar.
Use case could be non-Codex-Vue environments or providing a better loading experience in an SSR environment, reducing flash of unstyled content.

Further examples:
https://codepen.io/web-dot-dev/pen/PomBZdy

Open questions

  • Should accent-color be a token reference even in theme already, pointing back to another color there?
    • Do we rely just on color.accent in theme tokens?
    • Will there ever be two accent-color theme options. I would not think so, the accent color is the main brand color and should for example work in light and dark mode. Unsure if that's fully sufficient everywhere.
  • Or would only a decision token be better option (see original proposal, problematic from theming perspective to Eric's concerns)?

Proposal

theme options:
color.accent: { color.blue600 } with reference to other base token color! That opens up themability.

decisions
accent.color: { color.accent }

Design spec

Acceptance criteria for done

Design

Code

  • Define accent-color option and decision tokens.
    • With default value #36c in WikimediaUI theme.
    • Apply in all supported components, probably as mixin. Not part as acceptance criteria for initial task any longer

Related Objects

StatusSubtypeAssignedTask
Duplicate STH
InvalidNone
ResolvedVolker_E
ResolvedNone
Resolvedbmartinezcalvo
ResolvedVolker_E
Resolved EUdoh-WMF
ResolvedSarai-WMDE
ResolvedDAbad
ResolvedVolker_E
Resolvedbmartinezcalvo
Resolved KieranMcCann
OpenNone
DuplicateNone
ResolvedVolker_E
ResolvedDAbad
ResolvedVolker_E
ResolvedDAbad
ResolvedSarai-WMDE
ResolvedCatrope
OpenNone
Resolvedovasileva
ResolvedBUG REPORTVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedSarai-WMDE
ResolvedVolker_E
Resolvedbmartinezcalvo
ResolvedCatrope
ResolvedDAbad
ResolvedVolker_E

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Volker_E renamed this task from Evaluate `accent-color` support to Codex and implement to Define `accent-color` design token.Dec 8 2022, 3:17 AM

Change 867449 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] tokens: Add `accent-color`

https://gerrit.wikimedia.org/r/867449

@Volker_E I created this new Figma version for color tokens' spec adding the accent-color for both option and decision tokens. I leaved you some comments in Figma so please review them and let me know if you agree with this proposal so I can move it to Ready for development.

What are components affected? Mostly this token would only affect a certain kind of fallback component solution like native HTML elements like a checkbox rendered before JavaScript comes in. And only in edge cases.
The one component where it should have an effect of the finally rendered component is an approach to use HTML5 progress bar instead of our custom div soup for semantics and accessibility. With a newer approach to cross-browser render progress bars in a custom CSS first way.

Change 867449 merged by jenkins-bot:

[design/codex@main] tokens: Add `accent-color`

https://gerrit.wikimedia.org/r/867449

I think it's fair to skip QA here with @EUdoh-WMF out, the accent-color token is in place and has seen code and design review by numerous folks.

Change 878213 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v0.4.2 to v0.4.3

https://gerrit.wikimedia.org/r/878213

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/b7ca0fd8f5/w

Change 878213 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.4.2 to v0.4.3

https://gerrit.wikimedia.org/r/878213

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/b7ca0fd8f5/w/