3 ms·
I adore Svelte, but I still have a separate project for SCSS for a number of reasons. 1) There's always a need for global CSS anyway. 2) I've found having sty
by pier25 5y ago
I adore Svelte, but I still have a separate project for SCSS for a number of reasons.
1) There's always a need for global CSS anyway.
2) I've found having styles in SFCs only works for very small components. Once you're adding JS and HTML, SFCs become a pain to navigate. I've been using SFCs in Vue too for 6 years.
3) Having an old school SCSS project makes it much easier to use all SCSS features (eg: mixins) and organize the cascading in any way you prefer.
4) If you have a separate design team, they can work on the SCSS in parallel.
- dangoor 5y agoThat makes sense. I just started a new project with SvelteKit and Tailwind. I appreciate how Tailwind puts some boundaries and defaults around the styling of components, and recognize that there are still places where global styling makes sense.
- FractalHQ 5y agoI always have a “styles” folder with scss in my Sveltekit projects, and use scss in my Svelte components. Svelte auto-preprocessor makes it pretty effortless.
- pier25 5y agoHow do you control the cascading? Can you use Mixins without having to import them on every .svelte file?