SvelteKit: Scss doesn't work.

takashi-kisaku

TK

Posted on April 15, 2022

SvelteKit: Scss doesn't work.

I added sass with below code
yarn add -D node-sass

Then write code like below

// in Markdown.svelte component
<style lang="scss">
.markdown {
 h1 {
  font-size: 100px;
 {
}
<style/>

<div class="markdown">
  <slot/>
</div>
Enter fullscreen mode Exit fullscreen mode

Then this code wasn't applied css by scss.
Because <slot/> element was encapsulated by SvelteKit. So scss didn't matter. I have to define .scss file and apply

💖 💪 🙅 🚩
takashi-kisaku
TK

Posted on April 15, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

SvelteKit: Scss doesn't work.
javascript SvelteKit: Scss doesn't work.

April 15, 2022