- From: Donnie D'Amato via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 Nov 2023 03:11:37 +0000
- To: public-design-tokens-log@w3.org
> However, a problem with @ddamato's suggestion of just allowing any `$value` to be an array is that for some types a singular token value might already a JSON array. For example `fontFamily` tokens may have array values (which are meant to be intepreted as a font stack from most to least preferred font family name). Similarly, `gradient` token values are arrays of objects representing the color stops. For clarity, my post isn't a suggestion but a thought experiment that eventually lands on the reason why I don't think these should be arrays; the accessor to get to these items would be variable making them difficult to target, especially across themes which might have different lists. In my mind, it's easy to ensure the same token names exists across files, thereby ensuring that a token name can be used always. It'll be much harder when the accessor is potentially varied across files. ```json5 // theme1.json tokens.colors.red = #ff0000 tokens.colors.dataviz[5] = #271f24 // theme2.json tokens.colors.red = #550000 tokens.colors.dataviz[5] = undefined ``` -- GitHub Notification of comment by ddamato Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/228#issuecomment-1822021091 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 22 November 2023 03:11:39 UTC