Future-proofing Changes from the DTCG Specifications #3236
Labels
💡request
Community feedback
Token Format
Legacy and W3C DTCG conversion and JSON
W3C DTCG
Alignment with specification
Is your feature request related to a problem? Please describe.
We need to find a system to keep up-to-date with the DTCG spec's future changes. One such change for example is how the plugin currently saves a dimension token:
As opposed to how it has most recently been defined in the spec. Particularly the use of
$value
as well asvalue
:Current gaps found (by Jacob Morrison) between DTCG spec and Tokens Studio's automated transformation:
Values
dimension tokens should have a value of { "value": number, "unit": 'px' | 'rem' }
opacity tokens should have a number value (instead of a string)
duration tokens should have a value of { "value": number, "unit": 'ms' | 's' }
Outdated types
"$type": "spacing" should be "$type": "dimension"
"$type": "sizing" should be "$type": "dimension"
"$type": "borderRadius" should be "$type": "dimension"
"$type": "borderWidth" should be "$type": "dimension"
"$type": "opacity" should be "$type": "number" (revisit the spec, there is currently a note about potentially adding a percentage type for this use case)
lineHeights, fontWeights, fontFamilies, and fontSizes are typed incorrectly, preferring plural terminology to the spec's single-value terminology (e.g. TS: fontFamilies, spec: fontFamily)
Missing composites
TS uses its own boxShadow composite token. DTCG has a shadow type composite spec
Border styles can be implemented as composite border tokens
The text was updated successfully, but these errors were encountered: