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 14f8f82 commit c2c5d9bCopy full SHA for c2c5d9b
packages/tailwindcss-language-service/src/util/rewriting/replacements.ts
@@ -76,6 +76,12 @@ export function replaceCssVars(
76
})
77
78
if (replacement !== null) {
79
+ // If we're replacing this variable with a reference back it *itself*
80
+ // we should skip over it
81
+ if (replacement.includes(`var(${varName})`) || replacement.includes(`var(${varName},`)) {
82
+ break
83
+ }
84
+
85
str = str.slice(0, i) + replacement + str.slice(j + 1)
86
}
87
0 commit comments