Page MenuHomePhabricator

Add component tokens for link colors in Codex
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

We currently handle several types of links (including “red” links) by assigning specific component tokens. However, we’d like to add distinct tokens for normal links (and possibly dark links in the future).
Note that all Wikimedia deployed skins’ 'mediawiki.skin.variables.less' file already implement this pattern.

Why focus on Links?

Links and buttons are in our default "WikimediaUI" Codex theme both “progressive” elements with color-progressive as chosen token, but that's not very common in other user-interface stylings. They often are styled differently.
Right now, “red” links have their own token, and it’d also be consistent to give normal links their own dedicated tokens as well. This prevents styling collisions and keeps the theming of links separate from all other "progressive" elements (like buttons) _if needed_.

Known use cases

Related issues

Goal

Style links simpler without facing theming issues on other, in many skins/themes visually distinct, components.

User stories

  • As skin author and Codex theme author, I'd like to separate out link colors from other progressive elements in order to not run into collision with the two similar, but distinctly used styles.

Previous implementations

Design spec

Component spec sheet tbd

Open questions

  • Nomenclature:
    • link or link-default? => link for simplicity and dev-exp reasons here.
    • link-red or link-new? => link-red as it not only is a group for new, but also undefined articles and is the term used by the wikis for it. See also T313507
    • link-dark or link-subtle? => link-subtle as dark doesn't provide clarity in multi light mode environment like ours.

Acceptance criteria for done

Design

  • Rename and move link--visited--x tokens to be component tokens and ensure continued linkage to Link

Code

  • Implement the default link component tokens in Codex, as color-link default and color-link--hover etc. as state tokens with current WikimediaUI theme using skin (Vector & MN) values of aliasing color-progressive etc.
  • Update components/mixins that use these tokens

Follow-up after Codex release upstream into MediaWiki
Tackle the current skin issues and other architecture issues derived from this:

Event Timeline

bmartinezcalvo renamed this task from Add link color tokens in Codex to Add component tokens for link colors in Codex.May 10 2023, 8:43 AM
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo updated the task description. (Show Details)

@Volker_E we have this now, right? Can this task be closed?

Volker_E edited subscribers, added: Sarai-WMF; removed: Sarai-WMDE.

@Volker_E we have this now, right? Can this task be closed?

@DTorsani-WMF Would you clarify, what you referred to with 'we have this now'?

The new description is more clear to me and I see that you are advocating for base link color component tokens. I can understand why we would want to do that. We can leave this task open.

CCiufo-WMF renamed this task from Add component tokens for link colors in Codex to [Timebox] Add component tokens for link colors in Codex.Mar 10 2025, 5:07 PM
CCiufo-WMF triaged this task as Medium priority.
CCiufo-WMF set the point value for this task to 3.
CCiufo-WMF moved this task from Needs Refinement to Up Next on the Design-System-Team board.
Volker_E renamed this task from [Timebox] Add component tokens for link colors in Codex to Add component tokens for link colors in Codex.Jul 14 2025, 9:26 PM
ovasileva moved this task from Incoming to Needs refinement on the Reader Experience Team board.
ovasileva changed the point value for this task from 3 to 2.

Change #1172073 had a related patch set uploaded (by LorenMora; author: LorenMora):

[design/codex@main] design-tokens: Add link-default tokens for all states

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

DTorsani-WMF moved this task from In Progress to Code Review on the Codex board.
Volker_E updated the task description. (Show Details)
Volker_E updated Other Assignee, added: Volker_E.

Change #1172073 merged by jenkins-bot:

[design/codex@main] tokens: Add default link tokens including all interaction and visited states

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

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

[design/codex@main] Link, docs: Use new `color-link` token for Links and docs application

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

Change #1172119 merged by jenkins-bot:

[design/codex@main] Link, docs: Use new `color-link` token for Links and docs application

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

Jdrewniak closed this task as Resolved.EditedJul 29 2025, 11:58 AM
Jdrewniak subscribed.

The new token names have been merged into Codex and they'll be included in an upcoming release (date TBD) . Afterwards we'll follow-up on this in T400300 by replacing the tokens with the color-link versions. That task is in the reader experience backlog. Signing off.

Change #1178961 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/core@master] Update Codex from v2.2.1 to v2.3.0

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

Test wiki created on Patch demo by LMora-WMF using patch(es) linked to this task:
https://52ad408a3b.catalyst.wmcloud.org/w/

Change #1178961 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v2.2.1 to v2.3.0

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

Change #1180982 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/core@master] Update Codex from v2.2.1 to v2.3.1

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

Test wiki created on Patch demo by LMora-WMF using patch(es) linked to this task:
https://590db65713.catalyst.wmcloud.org/w/

Change #1180982 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v2.2.1 to v2.3.1

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

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

https://590db65713.catalyst.wmcloud.org/w/

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

https://52ad408a3b.catalyst.wmcloud.org/w/