Skip to content

Commit 32c2d13

Browse files
fix: keep textCase and textDecoration token types as is (#302)
1 parent 19f4530 commit 32c2d13

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.changeset/smart-pets-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tokens-studio/sd-transforms': patch
3+
---
4+
5+
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.

src/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ export const expandTypesMap = {
2929
typography: {
3030
paragraphSpacing: 'dimension',
3131
paragraphIndent: 'dimension',
32-
textDecoration: 'other',
33-
textCase: 'other',
34-
// even though this type does not yet exist in DTCG, it really should, since lineHeights can be both dimension or number
35-
lineHeight: 'lineHeight',
36-
// same as lineHeight except for fontWeight: recognized fontWeight keys (e.g. "regular") should be recognized as well as numbers
37-
fontWeight: 'fontWeight',
32+
// for types "textDecoration", "textCase", "fontWeight", "lineHeight", we should keep the type as is
33+
// because no DTCG type that currently exists provides a good match.
34+
// for fontWeight: recognized fontWeight keys (e.g. "regular")
35+
// for lineHeight: lineHeights can be both dimension or number
3836
},
3937
};

0 commit comments

Comments
 (0)