Open MatthiasDunker opened 2 years ago
Another (creative) example could be responsive values, if this makes sense. A token could have multiple values distinguished by variant names.
Type could be responsiveDimension
.
{
"responsiveDimension": {
"$type": "typeDefinition",
"$value": {
"sm": "dimension",
"md": "dimension",
"lg": "dimension",
"xl": "dimension",
}
}
}
Usage would be:
{
"grid": {
"gutter": {
"$type": "responsiveDimension",
"$value": {
"sm": "24px",
"md": "32px",
"lg": "32px",
"xl": "40px"
}
}
}
}
The Introduction of the current Draft Report says:
Why then are composite tokens limited to a specific set (Stroke, Border, Transition, Shadow, Gradient, Typography — which seem to be related to CSS shorthands)? And is this really platform agnostic?
For example, if I have a platform that has a use case that relies on color pairs (background, foreground), can I define a token following the current draft? Can I define my own composite type?
Type
colorPair
could be defined asUsage would be:
What do you think?