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 8d7cf57 commit 4168a2dCopy full SHA for 4168a2d
apps/builder/app/builder/features/style-panel/sections/advanced/advanced.tsx
@@ -1,3 +1,4 @@
1
+import { lexer } from "css-tree";
2
import { colord } from "colord";
3
import {
4
memo,
@@ -111,10 +112,14 @@ const matchOrSuggestToCreate = (
111
112
if (isFeatureEnabled("cssVars") === false) {
113
return matched;
114
}
- if (search.trim().startsWith("--")) {
115
+ const propertyName = search.trim();
116
+ if (
117
+ propertyName.startsWith("--") &&
118
+ lexer.match("<custom-ident>", propertyName).matched
119
+ ) {
120
matched.unshift({
- value: search.trim(),
- label: `Create "${search.trim()}"`,
121
+ value: propertyName,
122
+ label: `Create "${propertyName}"`,
123
});
124
125
0 commit comments