DEV Community

TK
TK

Posted on • Updated on

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

Top comments (0)