zss-engine 2.2.0 → 2.2.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/cjs/utils/helper.js
CHANGED
|
@@ -49,7 +49,7 @@ const convertHexToColorName = (value) => {
|
|
|
49
49
|
};
|
|
50
50
|
const applyCssValue = (value, cssProp) => {
|
|
51
51
|
if (typeof value === 'number') {
|
|
52
|
-
return exception.includes(cssProp) ? value.toString() : value + 'px';
|
|
52
|
+
return exception.includes(cssProp) || cssProp.startsWith('--') ? value.toString() : value + 'px';
|
|
53
53
|
}
|
|
54
54
|
return convertHexToColorName(value);
|
|
55
55
|
};
|
package/dist/esm/utils/helper.js
CHANGED
|
@@ -46,7 +46,7 @@ const convertHexToColorName = (value) => {
|
|
|
46
46
|
};
|
|
47
47
|
export const applyCssValue = (value, cssProp) => {
|
|
48
48
|
if (typeof value === 'number') {
|
|
49
|
-
return exception.includes(cssProp) ? value.toString() : value + 'px';
|
|
49
|
+
return exception.includes(cssProp) || cssProp.startsWith('--') ? value.toString() : value + 'px';
|
|
50
50
|
}
|
|
51
51
|
return convertHexToColorName(value);
|
|
52
52
|
};
|