From 5e56a9a93860c488ae979ce58f870e75a67d1c15 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Sat, 9 May 2020 16:31:18 +0200 Subject: [PATCH] Feat(curriculum): scss not sass (#38764) --- client/src/templates/Challenges/rechallenge/transformers.js | 4 +++- ...y-a-style-until-a-condition-is-met-with-while.english.md | 4 ++-- .../sass/create-reusable-css-with-mixins.english.md | 4 ++-- ...tend-one-set-of-css-styles-to-another-element.english.md | 4 ++-- .../sass/nest-css-with-sass.english.md | 4 ++-- .../sass/store-data-with-sass-variables.english.md | 4 ++-- .../sass/use-each-to-map-over-items-in-a-list.english.md | 6 +++--- .../sass/use-for-to-create-a-sass-loop.english.md | 6 +++--- .../use-if-and-else-to-add-logic-to-your-styles.english.md | 4 ++-- 9 files changed, 21 insertions(+), 19 deletions(-) diff --git a/client/src/templates/Challenges/rechallenge/transformers.js b/client/src/templates/Challenges/rechallenge/transformers.js index 3f7bb01e15..90fd88394f 100644 --- a/client/src/templates/Challenges/rechallenge/transformers.js +++ b/client/src/templates/Challenges/rechallenge/transformers.js @@ -177,7 +177,9 @@ function getBabelOptions({ preview = false, protect = true }) { const sassWorker = createWorker(sassCompile); async function transformSASS(element) { - const styleTags = element.querySelectorAll('style[type="text/sass"]'); + // we only teach scss syntax, not sass. Also the compiler does not seem to be + // able to deal with sass. + const styleTags = element.querySelectorAll('style[type~="text/scss"]'); await Promise.all( [].map.call(styleTags, async style => { style.type = 'text/css'; diff --git a/curriculum/challenges/english/03-front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while.english.md b/curriculum/challenges/english/03-front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while.english.md index 5f07537d5b..ed2971c9b2 100644 --- a/curriculum/challenges/english/03-front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while.english.md @@ -60,7 +60,7 @@ tests:
```html -