(1) Why do you (and seemingly everybody else) put tailwind.css into the public folder ? It seems to me that only the generated index.css needs to be there and it makes more sense to put tailwind.css under src/ !?
(2) With this setup my @apply rules in the style section seem to get lost or not effective (Before i had it working with the setup of dev.to/sarioglu/using-svelte-with-...). Any way to make this work as well ?
2) This tutorial seems to follow a minimalist mindset and only compiles postcss files, not svelte files. If you want to process postcss in svelte files, follow the other tutorial for everything but purgecss. Everything else that differs is because he is calling postcss directly instead of using svelte-preprocessor which you need for running postcss in svelte files.
1) Source file doesn't have to be there, may need to be moved depending on your tooling. If you follow the other tutorial, both files and the generating npm commands should be deleted and contents put in the <style global> instead.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for that post!
2 questions:
tailwind.css
into the public folder ? It seems to me that only the generatedindex.css
needs to be there and it makes more sense to puttailwind.css
undersrc/
!?@apply
rules in thestyle
section seem to get lost or not effective (Before i had it working with the setup of dev.to/sarioglu/using-svelte-with-...). Any way to make this work as well ?2) This tutorial seems to follow a minimalist mindset and only compiles postcss files, not svelte files. If you want to process postcss in svelte files, follow the other tutorial for everything but purgecss. Everything else that differs is because he is calling postcss directly instead of using
svelte-preprocessor
which you need for running postcss in svelte files.1) Source file doesn't have to be there, may need to be moved depending on your tooling. If you follow the other tutorial, both files and the generating npm commands should be deleted and contents put in the
<style global>
instead.