@sit-onyx/figma-utils 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/parse.js +2 -2
- package/package.json +1 -1
package/dist/utils/parse.js
CHANGED
|
@@ -74,8 +74,8 @@ export const parseFigmaVariables = (apiResponse, options) => {
|
|
|
74
74
|
export const resolveFigmaVariableValue = (value, allVariables, remBase = 16) => {
|
|
75
75
|
if (typeof value === "number") {
|
|
76
76
|
// numeric value, parse as rem or pixel value
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
// note: value 0 should also be parsed as "0rem" instead of just "0" because otherwise
|
|
78
|
+
// the CSS variable could not be used together with "calc()"
|
|
79
79
|
if (remBase === false || remBase <= 0)
|
|
80
80
|
return `${value}px`;
|
|
81
81
|
return `${value / remBase}rem`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/figma-utils",
|
|
3
3
|
"description": "Utility functions and CLI for importing data from the Figma API into different formats (e.g. CSS, SCSS etc.)",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"@sit-onyx/figma-utils": "./dist/cli.js"
|