From b8af49f035074185d29bc15ee324fd1d8d3e0e22 Mon Sep 17 00:00:00 2001 From: Tc001 <55956895+Tc-001@users.noreply.github.com> Date: Tue, 27 Jul 2021 15:51:03 +0300 Subject: [PATCH] Correctly compile `lang="sass" styles` (#857) * Added sass support * Combined cases, added check for indentedSyntax * Corrected changeset --- .changeset/cold-bikes-float.md | 5 +++++ packages/astro/src/compiler/transform/styles.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-bikes-float.md 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: {