Re: [community-group] Reference composite type attributes individually (#148)

> The biggest problem I see with this example is that there's no clear differentiation between a composite property and a group token. The basic rule for whether data is considered a Token is the presence of the `$value` property. Without an explicit `$value` for the composite token …

Agree. (Also sorry for bringing up old thread, but wanted to push this forward). I’d like to propose what I _think_ you’re suggesting, which is just making the `$value` explicit, and part of the alias (which seems like it would work because `$value` is a reserved word in the spec for this very reason):

```json
{
  "type styles": {
    "heading-level-1": {
      "$type": "typography",
      "fontFamily": { "$value": "Roboto", "$type": "string" },
    },
    "heading-level-2": {
      "$type": "typography",
      "fontFamily": "{type styles.heading-level-1.$value.fontFamily}",
    }
  }
}
```

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


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

Received on Thursday, 13 June 2024 20:33:42 UTC