I am new to Tailwind CSS. I got this error while building a React project:
The
hover:class does not exist. Ifhover:is a custom class, make sure it is defined within a@layerdirective.
I found a similar problem on StackOverflow but it isn't helping me. Can anyone tell me why this is happening?
//Index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.btn-purple {
@apply px-4 py-1 text-sm text-purple-600 font-semibold border border-purple-200 rounded-full hover: text-white hover:bg-purple-600 hover:border-transparent focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2;
}
}