generated from GarthDB/node-basic-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add open type formatter utility
- Loading branch information
1 parent
9cf73f7
commit fa20b9f
Showing
7 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
type: "value", | ||
name: "font/openType", | ||
matcher: (token) => token.name.includes("font-weight"), | ||
transformer: (token) => { | ||
return { | ||
"light": "300", | ||
"regular": "400", | ||
"medium": "500", | ||
"semibold": "600", | ||
"semi-bold": "600", | ||
"bold": "700", | ||
"extrabold": "800", | ||
"extra-bold": "800", | ||
"black": "900" | ||
}[token.value] || token.value; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
:root { | ||
--component-size: 12px; | ||
--component-black-font-weight: 900; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,13 @@ | |
"value": "12px" | ||
} | ||
} | ||
}, | ||
"black-font-weight": { | ||
"sets": { | ||
"spectrum": { | ||
"value": "black" | ||
} | ||
} | ||
} | ||
} | ||
} |