@apply
directive inside comment causes unexpected behaviorThis repository demonstrates an unexpected behavior in Tailwind CSS when using the @apply
directive inside a comment. The @apply
directive should be used within a class definition to apply pre-defined utility classes, but placing it in a comment block still impacts the generated CSS unexpectedly.
bug.js
file in your project.@apply
directive inside the comment.The solution (bugSolution.js
) shows the correct way to use the @apply
directive to ensure that only the intended classes are applied.