design-tokens icon indicating copy to clipboard operation
design-tokens copied to clipboard

Typography doesn't export in a transformable way if Fonts included

Open derekwsgray opened this issue 2 years ago • 0 comments

The README suggests (using standard format) that it can export both Fonts and Typography tokens, however the tree structure doesn't seem to be valid (by that I mean, using only style-dictionary transforms alone would not be enough, for web css)

It exports something like this:

{
  "myTheme": {
      "font": {
          "myFontA": {
              "type": "custom-fontStyle",
              "value": {
                  "fontSize": 42,
                  "textDecoration: ...  etc.
               },
               "fontSize": {
                  "type": "dimension",
                  "value": 42
               },
               ... the others
          }
      }
   }

Since myFontA has a type and a value key, the other siblings are not picked up as separate tokens and get ignored.

derekwsgray avatar Jul 27 '22 14:07 derekwsgray