Пример styleDictionary конфигурации, которая определяет animationKeyframe переменную на основе Вашего JSON-объекта:
{
"source": ["tokens/**/*.json"],
"platforms": {
"css": {
"transformGroup": "css",
"buildPath": "build/",
"files": [
{
"destination": "animation.css",
"format": "css/variables",
"filter": {
"type": "animation",
"property": "keyframe"
},
"options": {
"outputReferences": true
}
}
]
}
},
"properties": {
"animation": {
"keyframe": {
"type": "animation",
"category": "asset",
"value": "@keyframes test { 0% { background-position: 0 } 100% { background-position: 100px } }"
}
}
},
"types": {
"animation": {
"type": "object",
"properties": {
"keyframe": {
"type": "string",
"transform": {
"type": "name",
"value": "animationKeyframe"
}
}
}
}
}
}
out:
.my-animation {
animation-name: animationKeyframe;
animation-duration: 2s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}