summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Tc001 <55956895+Tc-001@users.noreply.github.com> 2021-07-27 15:51:03 +0300
committerGravatar GitHub <noreply@github.com> 2021-07-27 08:51:03 -0400
commitb8af49f035074185d29bc15ee324fd1d8d3e0e22 (patch)
tree419ef4254e6bc647f3b99012e794a8417582c786
parent4591c1f5aded7da108f91ff06bd923149e3924b2 (diff)
downloadastro-b8af49f035074185d29bc15ee324fd1d8d3e0e22.tar.gz
astro-b8af49f035074185d29bc15ee324fd1d8d3e0e22.tar.zst
astro-b8af49f035074185d29bc15ee324fd1d8d3e0e22.zip
Correctly compile `lang="sass" styles` (#857)
* Added sass support * Combined cases, added check for indentedSyntax * Corrected changeset
-rw-r--r--.changeset/cold-bikes-float.md5
-rw-r--r--packages/astro/src/compiler/transform/styles.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/cold-bikes-float.md b/.changeset/cold-bikes-float.md
new file mode 100644
index 000000000..3b13d84db
--- /dev/null
+++ b/.changeset/cold-bikes-float.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Added sass support
diff --git a/packages/astro/src/compiler/transform/styles.ts b/packages/astro/src/compiler/transform/styles.ts
index 715dfb942..53e7e0adc 100644
--- a/packages/astro/src/compiler/transform/styles.ts
+++ b/packages/astro/src/compiler/transform/styles.ts
@@ -109,7 +109,7 @@ async function transformStyle(code: string, { logging, type, filename, scopedCla
}
case 'sass':
case 'scss': {
- css = sass.renderSync({ data: code, includePaths }).css.toString('utf8');
+ css = sass.renderSync({ data: code, includePaths, indentedSyntax: styleType === 'sass' }).css.toString('utf8');
break;
}
default: {