@navita/engine 0.0.9 → 0.0.10

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.
Files changed (3) hide show
  1. package/index.js +4 -0
  2. package/index.mjs +4 -0
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -647,6 +647,10 @@ function processStyles({ cache , type }) {
647
647
  if (typeof value === "string") {
648
648
  newValue = value.trim().replace(/;[\n\s]*$/, "");
649
649
  }
650
+ // Check if value starts with --, if so, wrap in var()
651
+ if (typeof newValue === "string" && newValue.startsWith("--")) {
652
+ newValue = `var(${value})`;
653
+ }
650
654
  if (typeof value === "number") {
651
655
  newValue = pixelifyProperties(newProperty, value);
652
656
  }
package/index.mjs CHANGED
@@ -645,6 +645,10 @@ function processStyles({ cache , type }) {
645
645
  if (typeof value === "string") {
646
646
  newValue = value.trim().replace(/;[\n\s]*$/, "");
647
647
  }
648
+ // Check if value starts with --, if so, wrap in var()
649
+ if (typeof newValue === "string" && newValue.startsWith("--")) {
650
+ newValue = `var(${value})`;
651
+ }
648
652
  if (typeof value === "number") {
649
653
  newValue = pixelifyProperties(newProperty, value);
650
654
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navita/engine",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Navitas CSS-in-JS engine",
5
5
  "keywords": [
6
6
  "css-in-js",