Replies: 1 comment 1 reply
-
The technical reasoning might be more of a question for Svelte/Kit support. We use the script import method because that's what SvelteKit defaults to. My assumption is there is some bundling benefits. SvelteKit is of course using Vite under the hood, so Vite is what's actually handling this. Here's the docs talking about some of this: That's interesting the CSS import method allows Classes like I understand it can be convenient. Just be cautions not to go overboard with that approach. Again, Tailwind advises against it for good reason. |
Beta Was this translation helpful? Give feedback.
-
I find that I often want to make utility styles in my
app.postcss
and want to do things based off of skeletons styles likecard
etc (@apply card;
). So the solution I found was to put the imports at the top of myapp.postcss
(including my theme).This way I have access to everything and also I don't run into issues w/ "organizing imports" features in VSCode changing the order of them in my
Layout.svelte
. Maybe there is something I don't know about that makes doing this not a good idea?Beta Was this translation helpful? Give feedback.
All reactions