[community-group] Multiple values - Array type (#239)

jorenbroekema has just created a new issue for https://github.com/design-tokens/community-group:

== Multiple values - Array type ==
Raising this issue to discuss multi-value design tokens.

Relevant because I saw this idea pop up first for Shadow tokens, as it's quite common to layer shadows on top of another:
https://github.com/design-tokens/community-group/issues/100

Another example is dimension tokens e.g. when defining the padding of an element, say a button. You may want to specify a vertical and horizontal padding (or even all 4 sides explicitly), just like you may want to specify multiple shadow values as a single shadow. I think in both scenarios they can be viewed as a single design decision, thus is makes sense for it to be a single design token.
There's probably other examples we can think of, e.g. multiple gradient tokens being stacked at different coords to create gradient meshes/blobs. Transitions is also a good one, since those can be stacked as well to create a multi-step or multi-layered animation.

This brings up the broader question, should all tokens allow you to use an Array as value, where each item must adhere to the type specification? Is "multi-value" valid for every token? Is it only valid for some tokens, and if so, for which ones is it not and why not?
This could obviously be misused to squish many design decisions into a single token, which is why I'm not completely confident to have a strong opinion on the answer to this and why I think it warrants discussion.

I am leaning towards saying "yes, it's valid for all tokens, and the spec should guide users on what would be considered misuse of the feature"

Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/239 using your GitHub account


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

Received on Monday, 29 July 2024 09:46:41 UTC