Page MenuHomePhabricator

tokens: Better document `font-size-base`
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

@Jdrewniak has brought up a very good point recently:

I can see the utility @font-size-base going forward, even with rems.
That leads me to another question though. It seems like if @font-size-base ’s main responsibility is to derive other font-size values, then it should mostly stick to that role, and we should use variables like @font-size-small...medium...large in actual font-size properties. I guess what led me to ask this question is seeing @font-size-base being equivalent to @font-size-medium and wondering which one to use.

image.png (1×1 px, 156 KB)

Goal

Clarify usage intention of the magic token.

Acceptance criteria

  • Documentation updates to make intention clear
  • Update Codex code base to replace wrong usages of px featuring token for accessibility reasons

Event Timeline

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

[design/codex@main] styles: Replace falsely applied `font-size-base` with `font-size-medium`

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

Catrope set the point value for this task to 2.Nov 6 2023, 5:58 PM
Catrope moved this task from Needs Refinement to Up Next on the Design-System-Team board.
Volker_E renamed this task from Better document `font-size-base` to tokens: Better document `font-size-base`.Nov 6 2023, 7:08 PM
Volker_E added a project: Documentation.

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

[design/codex@main] tokens: Add explanatory comment for `font-size-base`

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

Change 972025 merged by jenkins-bot:

[design/codex@main] tokens: Add explanatory comment for `font-size-base`

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

@Catrope Another way would clearly be renaming the magic token, for example to cdx-font-size-base. We could then lint simpler against using those later on.

Change 972687 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v1.0.0 to v1.0.1

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

Change 972687 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.0.0 to v1.0.1

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

@Catrope Another way would clearly be renaming the magic token, for example to cdx-font-size-base. We could then lint simpler against using those later on.

I would be very OK with that as well, that would help distinguish it

Change 971336 merged by jenkins-bot:

[design/codex@main] styles: Replace falsely applied `font-size-base` with `font-size-medium`

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

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

[mediawiki/core@master] Update Codex from v1.1.1 to v1.2.0

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

Change 984519 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.1.1 to v1.2.0

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

@Volker_E should is this task resolved? Seems like the patches to address the acceptance criteria are merged.

All actionable quests have been resolved. Not putting it back to the DST Sprint for Codex 1.2.0, released at 2023-12-19 but leaving in this sprint.