DEV Community


Discussion on: Sveltekit & Tailwind CSS Combo

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;
Enter fullscreen mode Exit fullscreen mode

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