Page MenuHomePhabricator

Temporarily change or remove two tokens that can't be parsed by MediaWiki Less compiler
Closed, ResolvedPublic

Description

As noted in the parent task, there are two tokens that cause the Less compiler in MediaWiki to break:

"modifier-gray100-translucent": {
    "comment": "TODO: Not part of DS Figma yet. Equals `color-gray100` on white.",
    "value": "rgba( 0, 24, 73, calc( 7 / 255 ) )"
},
"modifier-gray200-translucent": {
    "comment": "TODO: Not part of DS Figma yet. Equals `color-gray200` on white.",
    "value": "rgba( 0, 24, 73, calc( 21 / 255 ) )"
},

The fraction within the calc() function is what breaks.

To unblock use of design tokens within MediaWiki, we should change or remove these tokens for now. Once the Less compiler can be updated (see T288498) we can reinstate them.

Proposal

We gonna change the token values to have calculation done and provide values statically for now.


Acceptance criteria
  • Decide how to handle these tokens for now (remove vs. change): change
  • Make the change in codex-design-tokens

Event Timeline

@Volker_E Would using decimal values in place of the fractions be an acceptable temporary workaround?

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

[design/codex@main] tokens: Use calculated value instead of `calc()`

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

Change 877271 merged by jenkins-bot:

[design/codex@main] tokens: Use calculated value instead of `calc()`

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

I think this can skip the other columns given it's just swapping out fraction values for equivalent decimal ones

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

Volker_E updated the task description. (Show Details)

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

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