Skip to content

Commit

Permalink
feat: add hairline and ultra to fontWeightsMap
Browse files Browse the repository at this point in the history
Extension of the font weights by the values hairline=1 and ultra=1000
  • Loading branch information
mdillgen authored and jorenbroekema committed Jul 14, 2023
1 parent 809b262 commit 29ac771
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 29ac771

Please sign in to comment.