koen1711
koen1711

Reputation: 3

Tailwind CSS not compiling CSS

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: [],
}

Upvotes: 0

Views: 2599

Answers (2)

Tsandesh
Tsandesh

Reputation: 19

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

Upvotes: 0

Daniel B. Papp
Daniel B. Papp

Reputation: 126

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; 

Upvotes: 2

Related Questions