SvelteKit: Scss doesn't work.
TK
Posted on April 15, 2022
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>
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
💖 💪 🙅 🚩
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.