@codecademy/gamut-styles

20.0.220.0.3-alpha.a75830.0
dist/variance/config.js
~dist/variance/config.jsModified
+6−1
Index: package/dist/variance/config.js
===================================================================
--- package/dist/variance/config.js
+++ package/dist/variance/config.js
@@ -449,10 +449,15 @@
     },
     resolveProperty: getPropertyMode,
     transform: transformSize
   },
+  // `scale: 'zIndexes'` resolves token names (e.g. `zIndex="modal"`) to `var(--zIndexes-*)`.
+  // `allowRawValue` keeps the numeric/global escape hatch (e.g. `zIndex={550}`,
+  // `zIndex={zIndexes.foreground + 1}`) that scaled props otherwise reject.
   zIndex: {
-    property: 'zIndex'
+    property: 'zIndex',
+    scale: 'zIndexes',
+    allowRawValue: true
   },
   opacity: {
     property: 'opacity'
   }