1

I installed the plugin @tailwindcss/line-clamp, but its not working its not being suggested by intellisense and even when I type in the class manually it doesn't change my styling . here is my tailwind config :

module.exports = {
  content: ['./src/**/*.tsx', './src/**/*.ts'],
  plugins: [require('@tailwindcss/forms'), require('@tailwindcss/line-clamp')],
}

btw this a typescript React project .

سعيد
  • 1,547
  • 1
  • 14
  • 32

2 Answers2

1

This same thing happend with me as well. For me I was using tailwind alongside with daisyUI and sometimes the vscode pulgin was working sometimes not.

  1. One thing you can follow, make sure to use the tailwind docs Taiwind Docs and follow the instruction on how to install tailwind for your project as per the framework you are using. Give it a try.

  2. Or if it's not working you can try installing the below extention along side with tailwind extention in vscode.

    HTML CSS Support

  3. You can also try to add the below in your settings.json. It worked for me actally.

"editor.quickSuggestions": {
    "strings": true
}

For more on this one - Stack Overflow

anuragp
  • 81
  • 5
0

answered here https://stackoverflow.com/a/72731657/12763140

The extension HTML CSS Support extension is not the correct way to go.you should follow the official installation section of the detail page in the extension page in VSC.

In order for the extension to activate you must have tailwindcss installed and a Tailwind config file named tailwind.config.js or tailwind.config.cjs in your workspace.

so adding a file (even empty) named tailwind.config.js or tailwind.config.cjs at the root of your app will make it work.