fix: css variables and scss interpolation (#4471)
This commit is contained in:
1 parent
2f5c00ad18
commit
bc2f57dcf9
3 files changed
+50
-1
No files matched your search
@@ -452,7 +452,7 @@ function genericPrint(path, options, print) {
|
||||
const isNextRightCurlyBrace =
|
||||
iNextNode.type === "value-word" && iNextNode.value === "}";
|
||||
|
||||
// Ignore interpolation in SCSS (i.e. ``#{variable}``)
|
||||
// Ignore interpolation in SCSS (i.e. `#{variable}`)
|
||||
if (
|
||||
isHash ||
|
||||
isLeftCurlyBrace ||
|
||||
@@ -465,6 +465,11 @@ function genericPrint(path, options, print) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`)
|
||||
if (iNode.value === "--" && iNextNode.value === "#") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const isNextHash =
|
||||
iNextNode.type === "value-word" && iNextNode.value === "#";
|
||||
|
||||
|
||||
Reference in new issue
Block a user