I have Tailwind V4 configured as Vite plugin, and it lives in global.css, which is imported in my Layout.astro.
But if I try to use @apply in a component, seems it doesn't know what to do with some of the classes given.
.btn {
@apply inline-flex items-center justify-center px-4 py-2 rounded text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
}
gives
Cannot apply unknown utility class: px-4
If I remove
px-4 py-2 rounded text-sm font-medium
It uses the rest of the classes without throwing any errors.