DEV Community

Discussion on: Sveltekit & Tailwind CSS Combo

Collapse
 
chenxeed profile image
Albert Mulia Shintra

Hi, thanks for the combo guidelines!

I have followed the steps above and in my case, I need to do two more steps.

  • Inside svelte.config.js, import/require the tailwind & autoprefixer and add it to the postcss
  • In the Svelte template, add the style to import tailwind:
<style global lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>
Enter fullscreen mode Exit fullscreen mode

I've made a boilerplate so I can refer it and reuse when needed. Hope it helps.

github.com/chenxeed/svelte-tailwin...