0

So I am working with Tailwind CSS is not compiling my HTML CSS mentions.

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./public/logs.html"
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

2 Answers 2

2

Could you post other files as well such as your package.json, and the .html file where you are either importing the compiled CSS or where you are importing the CSS file with the @tailwind decorators?

Options

  1. You can either run npx tailwindcss -i ./path_to_input.css -o ./path_to_output.css --watch while you are developing and make sure to import the outputted CSS file in your .html file.
  2. If you are developing with some sort of build system, then you can just add the below line to your .html file.
<link href="path_to_output.css" rel="stylesheet" />

In the case you are doing option 2, make sure your output.css file looks something like this:

@tailwind base;
@tailwind components;
@tailwind utilities; 
Sign up to request clarification or add additional context in comments.

3 Comments

<div class="bg-gray-600"> <fieldset id="userinfo"> <img src="" id="userinfo" alt="" class=""> <p class="username" id="username">Hi!</p> </fieldset> </div> And, /** @type {import('tailwindcss').Config} */ module.exports = { content: [ "./public/logs.html" ], theme: { extend: {}, }, plugins: [], }
Right, but where are you importing your tailwind CSS file? I’d suggest you look over the installation instructions and see if you have created and imported your CSS file. Link to Tailwinds installation docs: here
Hey, did you had ever an issue with the tailwind components and tailwind utilities not getting compiled into CSS? On project I have this issue while on another no
0

i had the same problem all i did was restart vscode and reinstalled npx tailwindcss -i ./path_to_input.css -o ./path_to_output.css --watch

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.