Skip to content

Commit

Permalink
Merge pull request #22 from the-markup/scss-in-svelte
Browse files Browse the repository at this point in the history
Add SCSS styles to Svelte preprocess
  • Loading branch information
joeleastwood committed Jan 30, 2024
2 parents 5e5b35b + 5abc759 commit 045a1ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/compile/svelte.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ module.exports = {
options: {
emitCss: true,
preprocess: SveltePreprocess({
scss: true,
scss: {
prependData: `@import 'src/${graphic.name}/sass/style.scss';`
},
sass: true
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/graphic/svelte/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
.messages {
.typescript {
color: white;
background-color: #3F74BA;
background-color: $c-lead;
}
.scss {
color: white;
background-color: #BA6993;
background-color: $c-plum;
}
}
</style>

0 comments on commit 045a1ff

Please sign in to comment.