Answers.Body: <p>I'm not 100% sure, but I think you just need to point Tailwind to the directories/files where it should scan for class names - in your case this might be simply <code>templates</code>. Add this in tailwind.config.js:</p>
  <pre class="lang-js prettyprint-override"><code>/** @type {import('tailwindcss').Config} */
  module.exports = {
    content: ['templates/**/*.twig'],
    ...
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-15T15:28:13.907Z
Answers.Text: Idk how you feel about it, but I could quite literally kiss you right now. Thanks mate!
Answers.UserDisplayName: Jorge Anzola
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-20T08:34:21.913Z
Answers.Text: ha ha, glad it helped!
Answers.UserDisplayName: James Smith
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-15T15:04:14.560Z
Answers.LastActivityDate: 2023-02-15T15:04:14.560Z
Answers.UserDisplayName: James Smith
Answers.Body: <p>There is an existing Craft / Vite / Docker / Tailwind boilerplate out there.</p>
  <p><a href="https://github.com/nystudio107/craft" rel="nofollow noreferrer">https://github.com/nystudio107/craft</a></p>
  <p>You can have a look here.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-20T12:24:24.653Z
Answers.LastActivityDate: 2023-02-20T12:24:24.653Z
Answers.UserDisplayName: Michael Thomas
Body: <p>I'm working on a CraftCMS 4 + Vite + TailwindCSS + Docker Boilerplate. And it's almost working, except for the fact that I'm importing</p>
  <pre><code>@import &quot;tailwindcss/base&quot;;
  @import &quot;tailwindcss/components&quot;;
  @import &quot;tailwindcss/utilities&quot;;
  </code></pre>
  <p>but in my frontend there are no styles. There is something imported there, but I don't think it's the correct stuff. I'm very new to Tailwind (and Vite) so I'm not sure if I'm doing something wrong.</p>
  <p>Here you can see more details <a href="https://github.com/JorgeAnzola/craft-4-boilerplate/issues/1" rel="nofollow noreferrer">https://github.com/JorgeAnzola/craft-4-boilerplate/issues/1</a></p>
  
Tags: <frontend>
Title: Help with Tailwind import
ThreadText: # Help with Tailwind import
  
  (Asked by: username_0 on 2023-02-15)
  
  I'm working on a CraftCMS 4 + Vite + TailwindCSS + Docker Boilerplate. And it's almost working, except for the fact that I'm importing
  
  ```
  @import "tailwindcss/base";
  @import "tailwindcss/components";
  @import "tailwindcss/utilities";
  
  ```
  
  but in my frontend there are no styles. There is something imported there, but I don't think it's the correct stuff. I'm very new to Tailwind (and Vite) so I'm not sure if I'm doing something wrong.
  
  Here you can see more details <https://github.com/username_0/craft-4-boilerplate/issues/1>
  
  **Tags:** frontend
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2023-02-15. Score: 3 | Accepted answer
  
  I'm not 100% sure, but I think you just need to point Tailwind to the directories/files where it should scan for class names - in your case this might be simply `templates`. Add this in tailwind.config.js:
  
  ```js
  /** @type {import('tailwindcss').Config} */
  module.exports = {
    content: ['templates/**/*.twig'],
    ...
  }
  
  ```
  
  > **Comments:**
  > **username_0**: Idk how you feel about it, but I could quite literally kiss you right now. Thanks mate!  
  > **username_1**: ha ha, glad it helped!  
  
  ---
  
  ### Answer by username_2 on 2023-02-20. Score: 1
  
  There is an existing Craft / Vite / Docker / Tailwind boilerplate out there.
  
  <https://github.com/nystudio107/craft>
  
  You can have a look here.
  
  
  ---
  
  