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

Tokens vs. themes as first-class citizens (or, first-order organizational paradigms?) is a really interesting question. In this case I'd suggest that themes are merely a way to use groups - in your example, you can simply further nest your tokens/groups.

So instead of:

```json
      "active": {
        "type": "color",
        "value": "#0000ff",
        "theme": {
          "dark": "#4080ff"
        }
      }
```

You'd have

```json
      "active": {
        "type": "color",
        "value": "#0000ff",
        "theme": {
          "type": "group",
          "value": {
            "dark": {
              "type": "color",
              "value:" "#4080ff"
            }
          }
        }
```

Whereas 'theme' isn't a special reserved word, it's just the name you chose for that group. So you'd have a nicely namespaced token named `active-theme-dark` or `activeThemeDark` or however you wanna parse the names.

I do think this raises some of the same concerns as we're discussing in #97, though - if you have a token and a group called 'active', it gets a bit confusing.

And in writing up this comment, it occurs to me that you'd probably want your tokens organized by theme when actually using them, rather than putting themes at the end of the taxonomical chain.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 January 2022 19:18:06 UTC