- From: Mathieu Dutour via GitHub <sysbot+gh@w3.org>
- Date: Tue, 28 Jan 2020 23:23:39 +0000
- To: public-design-tokens-log@w3.org
You don't really need a scripting language to define some sort of relationships:
```js
[
{
"name": "base-font-size",
"value": "1rem"
},
{
"name": "font-size-multiplier",
"value": 1.5
},
{
"name": "font-size-100",
"value": {
"func": "multiply",
"args": ["base-font-size", "font-size-multiplier"]
}
},
{
"name": "font-size-200",
"value": {
"func": "multiply",
"args": ["base-font-size", 2, "font-size-multiplier"]
}
},
{
"name": "font-size-300",
"value": {
"func": "multiply",
"args": ["base-font-size", 3, "font-size-multiplier"]
}
},
{
"name": "font-size-400",
"value": {
"func": "multiply",
"args": ["base-font-size", 4, "font-size-multiplier"]
}
},
]
```
as long as you know what `multiply` means, it's not too hard to create really powerful sets of tokens which can be played with in a GUI tool (as opposed to the pipe example you proposed: the output is inert and doesn't capture the relationship between 2 tokens)
--
GitHub Notification of comment by mathieudutour
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/1#issuecomment-579521038 using your GitHub account
Received on Tuesday, 28 January 2020 23:23:40 UTC