amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.93k stars 557 forks source link

Value missing after build #945

Open akhilpt07 opened 1 year ago

akhilpt07 commented 1 year ago

image after style build shadow values become object

Sidnioulz commented 1 year ago

The value must be a string in your tokens JSON file, not an object with multiple properties.

pascalduez commented 1 year ago

See the discussion about "composite tokens" in https://github.com/amzn/style-dictionary/issues/848

TL;DR currently if you want to use such tokens you'll need custom transformers.

If you follow DTCG specs for your shadow declarations, that might be of interest https://github.com/lukasoppermann/style-dictionary-utils/blob/main/src/transformer/shadow-css.ts for instance.