We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ffacbf commit c8f9de8Copy full SHA for c8f9de8
packages/react-strict-dom/src/native/stylex/index.js
@@ -648,6 +648,7 @@ export function props(
648
649
type Tokens = { [string]: string };
650
let count = 1;
651
+const RE_CAPTURE_VAR_NAME = /^var\(--(.*)\)$/;
652
653
export const __customProperties: MutableCustomProperties = {};
654
@@ -672,7 +673,7 @@ export const createTheme = (
672
673
const result: MutableCustomProperties = { $$theme: 'theme' };
674
for (const key in baseTokens) {
675
const varName: string = baseTokens[key];
- const normalizedKey = varName.replace(/^var\(--(.*)\)$/, '$1');
676
+ const normalizedKey = varName.replace(RE_CAPTURE_VAR_NAME, '$1');
677
result[normalizedKey] = overrides[key];
678
}
679
return result;
0 commit comments