Re: [community-group] [RFC] Theming (#2)

Am I wrong to think that "mixin", "interface", "component", and what you call here "variant" (which is completely different from how we defined it before) is pretty much just groups of tokens as defined [here](https://github.com/design-tokens/community-group/issues/1#issuecomment-504608516)?

Then it's up to the user to be consistent about the groups they define but I don't think there is for the *format* to enforce any kind of concept which for me are really application specific.

For example your second example could be described with just "variants"/"states", "value", "aliases" and "groups" as such:
```js
{
  // define the different possible states
  states: [{
    name: "theme",
    values: ["Light", "Dark"],
    default: "Light"
  }],
  tokens: [
    {
      name: "blue-500",
      type: "color",
      // default value of the token
      value: "#00F",
      variants: [
        {
          // override the value of the token when the theme is Dark
          theme: 'Dark',
          value: '#00A'
        }
      ]
    },
    {
      name: "gray-700",
      type: "color",
      value: "#AAA"
    },
    {
      name: "control-color",
      // reference another token
      value: "$gray-700"
    },
    {
      name: "emphasis-color",
      value: "$blue-500"
    },
    {
      name: "basic-control",
      // group some tokens
      value: [
        {
          name: "background-color",
          value: "$control-color"
        },
        {
          name: "border-color",
          value: "$control-color"
        },
      ]
    },
    {
      name: "enphasis-control",
      value: [
        {
          name: "background-color",
          value: "$emphasis-color"
        },
        {
          name: "border-color",
          value: "$emphasis-color"
        },
      ]
    },
    {
      name: "radio-button",
      value: "$basic-control"
    },
    {
      name: "radio-emphasis",
      value: "$enphasis-control"
    }
  ]
}
```

So in the mental model I have of tokens, interfaces/groups/mixin/components are not related to themes/variants/states.

-- 
GitHub Notification of comment by mathieudutour
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/2#issuecomment-537613456 using your GitHub account

Received on Wednesday, 2 October 2019 18:08:23 UTC