File tree Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -47,30 +47,30 @@ Create a simple token file called `tokens.json`:
4747
4848<TokenScriptCodeBlock mode =" json " showResult ={false} >
4949{`{
50- "spacing": {
51- "base": {
52- "$type": "dimension",
53- "$value": "8px"
50+ "spacing": {
51+ "base": {
52+ "$type": "dimension",
53+ "$value": "8px"
54+ },
55+ "large": {
56+ "$type": "dimension",
57+ "$value": "{spacing.base} * 2"
58+ },
59+ "xlarge": {
60+ "$type": "dimension",
61+ "$value": "{spacing.large} * 1.5"
62+ }
5463 },
55- "large": {
56- "$type": "dimension",
57- "$value": "{spacing.base} * 2"
58- },
59- "xlarge": {
60- "$type": "dimension",
61- "$value": "{spacing.large} * 1.5"
62- }
63- },
64- "colors": {
65- "primary": {
66- "$type": "color",
67- "$value": "#0066FF"
68- },
69- "primaryLight": {
70- "$type": "color",
71- "$value": "lighten({colors.primary}, 20)"
64+ "colors": {
65+ "primary": {
66+ "$type": "color",
67+ "$value": "#0066FF"
68+ },
69+ "primaryLight": {
70+ "$type": "color",
71+ "$value": "lighten({colors.primary}, 20)"
72+ }
7273 }
73- }
7474}`}
7575</TokenScriptCodeBlock >
7676
@@ -84,11 +84,11 @@ tokenscript parse_json --json tokens.json --output tokens-resolved.json
8484
8585<TokenScriptCodeBlock mode =" json " showResult ={false} >
8686{`{
87- "spacing.base": "8px",
88- "spacing.large": "16px", // Computed: 8px * 2
89- "spacing.xlarge": "24px", // Computed: 16px * 1.5
90- "colors.primary": "#0066FF",
91- "colors.primaryLight": "#4D94FF" // Computed: lightened version
87+ "spacing.base": "8px",
88+ "spacing.large": "16px", // Computed: 8px * 2
89+ "spacing.xlarge": "24px", // Computed: 16px * 1.5
90+ "colors.primary": "#0066FF",
91+ "colors.primaryLight": "#4D94FF" // Computed: lightened version
9292}`}
9393</TokenScriptCodeBlock >
9494
You can’t perform that action at this time.
0 commit comments