Skip to content

Commit

Permalink
letterSpacing is no longer a dimension token (#316) (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
florin01hyma authored Nov 7, 2024
1 parent 695cea7 commit 5de4025
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-pianos-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': patch
---

Addressed issue #316 about letterSpacing. LetterSpacing is no longer a dimension token. Also, the expand composition test token has been modify to test if the letterSpacing still works properly.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const expandTypesMap = {
sizing: 'dimension',
borderRadius: 'dimension',
borderWidth: 'dimension',
letterSpacing: 'dimension',
paragraphSpacing: 'dimension',
paragraphIndent: 'dimension',
text: 'content',
Expand Down
4 changes: 4 additions & 0 deletions test/integration/expand-composition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ describe('expand composition tokens', () => {
--sdCompositionHeaderFontFamily: Roboto;
--sdCompositionHeaderFontSize: 96px;
--sdCompositionHeaderFontWeight: 700;
--sdCompositionHeaderLineHeight: 1.25;
--sdCompositionHeaderLetterSpacing: 1.25em;
--sdTypography: italic 800 26px/1.25 Arial;
--sdFontWeightRefWeight: 800;
--sdFontWeightRefStyle: italic;
Expand All @@ -95,6 +97,8 @@ describe('expand composition tokens', () => {
--sdCompositionHeaderFontFamily: Roboto;
--sdCompositionHeaderFontSize: 96px;
--sdCompositionHeaderFontWeight: 700;
--sdCompositionHeaderLineHeight: 1.25;
--sdCompositionHeaderLetterSpacing: 1.25em;
--sdTypographyFontFamily: Arial;
--sdTypographyFontWeight: 800;
--sdTypographyLineHeight: 1.25;
Expand Down
4 changes: 3 additions & 1 deletion test/integration/tokens/expand-composition.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"value": {
"fontFamily": "{composition.fontFamily}",
"fontSize": "96",
"fontWeight": "{composition.fontWeight}"
"fontWeight": "{composition.fontWeight}",
"lineHeight": "125%",
"letterSpacing": "125%"
},
"type": "composition"
}
Expand Down

0 comments on commit 5de4025

Please sign in to comment.