sd-transforms: [Bug]: resolve math with triple multi-value + references is not working
What happened?
issue when three things are combined:
- math expression
- multi-value (with spaces to separate them)
- token references
{
"scale": {
"value": 4,
"type": "spacing"
},
"2xs": {
"value": "{scale}*1.5",
"type": "spacing"
},
"foo": {
"value": "{2xs} {2xs} {2xs}",
"type": "spacing"
}
}
the output of foo, the math is not resolved in the 2nd and 3rd value, we get 6px 4px*1.5 4px*1.5
Reproduction
Expected output
we expect 6px 6px 6px
Version
0.9.10
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (7 by maintainers)
The configurator doesn’t handle multiple files very well, which may be the issue. I’ve tried to replicate here but didn’t quite work: https://configurator.tokens.studio/#project=hVRdb5swFP0rV2hSPkSgrbaXZJ0mrer6OK3TXsa0OmCCO7CRbbpGiP++6w9IIGmbJ3w/zj33+DhtcHG5UrrJmIi0+Eu5ih6V4ME6aBMOkAQqJSVNgjXYs4k8kbKxkfdhH9L72kawvCYp47skMKku9Bh98Ajl6lkdnSfISdDaud3yMvqQBOFx0QuzcJodmfAuCIOLq5WiFeGapercXudZvcTsDDvXG2FtB6+cRtzf4D/sMGyRCp6z3fRCRCNTi/Cr32S5jJfHWzrE3179uiQ6F7JSI/1TNd4SiUnClSn8KkVTO4q2KjzU1JLm7NnTz0apbcPK7BvRhcvaY4z98agqZyVVR+TNb6R0EmRUacaJZmYRA/XniUhGttgYjfl4SKRM9MA3HqrPCIuqnJpF0h1Tmsr7m9uGp2aukREVZ1UtpIZ7vS/pDbMZIveQS1HBTJnoKhvCs03CfUMLPeSPXlMFne/77C7KP7pYZatBeGUwEh7HMIqGcMUzqIkkFUVMwCCI2vKElHDYUiBZRjPbeU8pZCJVayi0rtU6jndMF802SkUVvzI64aec55PNFz09+kyquqRgnwQMICH8K1hawGOjNEqgG4kMdYEVZi4QBQznTECjk7lzawjzTtaHZ2cvnaMCJlbtv+AIUQ0tPo8+SAsq1zC3Exdw/Qla9y80kJymnR8cW0d0A7jix9Xq0GOoc0qtxs42C6+EMx8UtKypVO6Kp85IOD5kZWxh3H9HSUZl6Ds1zX72fkWLXE/NFrmyO4c/1R/t7nFelvXW5p2mTr9ZL59Lzaw+PR1UJ/evYN4edggt97D3XbfohetXE42uG/2d5lRSnvplfPVmpPHDu/agw9x+d4tuLYXQBhSzJ8rMfQy548qzEI6JTScjGF7Qw2a4KvwKuv8=
I have however sent my build.js on Slack which may help. You already have all the tokens from our previous discussion.