Skip to content

Commit

Permalink
Merge pull request #173 from mdillgen/patch-1
Browse files Browse the repository at this point in the history
Update/extend transformFontWeights.ts
  • Loading branch information
jorenbroekema authored Jul 14, 2023
2 parents 809b262 + 29ac771 commit 57c9368
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-bees-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': patch
---

Add hairline and ultra to fontWeightsMap, reflect to 1 and 1000 respectively.
2 changes: 2 additions & 0 deletions src/transformFontWeights.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const fontWeightMap = {
hairline: 1,
thin: 100,
extralight: 200,
ultralight: 200,
Expand All @@ -23,6 +24,7 @@ export const fontWeightMap = {
heavy: 900,
super: 900,
extrafett: 900,
ultra: 1000,
};

export const fontWeightReg = /(?<weight>.+?)\s?(?<style>italic|oblique|normal)?$/i;
Expand Down

0 comments on commit 57c9368

Please sign in to comment.