This repository demonstrates the deprecation of the @apply
directive in Tailwind CSS v3 and provides a solution.
The @apply
directive, used to apply custom CSS classes defined in your Tailwind configuration, is no longer supported in Tailwind CSS v3. Using it will result in build errors or unexpected styling.
The solution is to directly apply the required utility classes to your HTML elements instead of using @apply
.
bug.html
to see the deprecated code example.bugSolution.html
to see the updated code that applies utility classes directly.