Skip to content

Commit

Permalink
fix: keep textCase and textDecoration token types as is (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema authored Jul 29, 2024
1 parent 19f4530 commit 32c2d13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-pets-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': patch
---

textCase and textDecoration types should be kept, instead of changing to "other". This should help with transforms targeting those tokens, whereas "other" is not a useful type conversion whatsoever.
10 changes: 4 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ export const expandTypesMap = {
typography: {
paragraphSpacing: 'dimension',
paragraphIndent: 'dimension',
textDecoration: 'other',
textCase: 'other',
// even though this type does not yet exist in DTCG, it really should, since lineHeights can be both dimension or number
lineHeight: 'lineHeight',
// same as lineHeight except for fontWeight: recognized fontWeight keys (e.g. "regular") should be recognized as well as numbers
fontWeight: 'fontWeight',
// for types "textDecoration", "textCase", "fontWeight", "lineHeight", we should keep the type as is
// because no DTCG type that currently exists provides a good match.
// for fontWeight: recognized fontWeight keys (e.g. "regular")
// for lineHeight: lineHeights can be both dimension or number
},
};

0 comments on commit 32c2d13

Please sign in to comment.