fix: css variables and scss interpolation (#4471)

This commit is contained in:
Evilebot Tnawi authored and GitHub committed 2018-05-12 22:38:28 +03:00
1 parent 2f5c00ad18
commit bc2f57dcf9
3 files changed
+50 -1

No files matched your search

+6 -1
View File
@@ -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 === "#";