- From: Romain Menke via GitHub <sysbot+gh@w3.org>
- Date: Tue, 24 Jan 2023 16:52:30 +0000
- To: public-design-tokens-log@w3.org
> But currently the specification doesn't support this. Just to clarify, this is a technical issue. ```json "$type": "color", "$value": "#fff" ``` ```json "$type": "color", "$value": { "colorSpace": "srgb", "channels": [0.1, 0.2, 0.3], "alpha": 0.6 } ``` In the specification `$type` is the only signal for how to interpret a value. So if I create a design token parser I need to be able to write this function : ``` function parse(token) { switch (token.type) { case "color": return parseColor(token.value); // ... } } ``` I am only supposed to differentiate based on the value of `$type`. What does `parseColor` do? -- GitHub Notification of comment by romainmenke Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/79#issuecomment-1402267050 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 24 January 2023 16:52:32 UTC