tailwind-css

tailwind not suggeting class after plugin install (intellisense not working ,@tailwindcss/line-clamp )


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 .


Solution

  • 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