- From: Matthias Dunker via GitHub <sysbot+gh@w3.org>
- Date: Thu, 26 May 2022 16:41:28 +0000
- To: public-design-tokens-log@w3.org
MatthiasDunker has just created a new issue for https://github.com/design-tokens/community-group:
== Limiting of composite token types to a given set is not platform agnostic ==
The [Introduction of the current Draft Report](https://design-tokens.github.io/community-group/format/#introduction) says:
> Design tokens are a methodology for expressing design decisions in a **platform-agnostic** way so that they can be shared across different disciplines, tools, and technologies.
Why then are composite tokens limited to a specific set (Stroke, Border, Transition, Shadow, Gradient, Typography — which seem to be related to CSS shorthands)? And is this really platform agnostic?
If I have a platform that relies on colorPairs (background, foreground), can I define a token following the current draft?
Can I define my own composite types?
Type `colorPair` could be defined as 
```json
{
  "colorPair": {
    "$type": "typeDefinition",
    "$value": {
      "foreground": "color",
      "background": "color"
    }
  }
}
# usage
{
  "color-token": {
    "$type": "colorPair",
    "$value": {
      "foreground": "#00000088",
      "background": "#ff0000"
    }
  }
}
```
What do you think?
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/134 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 26 May 2022 16:41:30 UTC