New tailwindcss classes not bundling in new blade files
Wondering what I'm doing wrong.
I have
composer dev
/ npm run dev
running, and created a new file:
resources/views/livewire/application-nav.blade.php
Added hover:text-blue-500
to an element in the new file, restarted the bundlers, but that class is never being generated in the bundled css file and therefore the text is not turning blue on hover.
Any help appreciated!18 Replies
Solution
to include new classes you need to build a custom theme first
it's fairly simple process, then you can ensure the resources dir is being include in the tailwind build
Thanks @toeknee
Do you mind elaborating, apologies
Then in the tailwind.config.js for that theme you will have the likes of
Ahhhh great, thank you @toeknee π
I have the same problem. I added a custom theme and a new content directory, and then I restarted Vite.

Any tips?
1) The directory
/resources/views/livewire/**/*.blade.php
doesnt exist. The file you're reffering to, resources-calendar.blade.php
is under /resources/views/filament/livewire/**/*.blade.php
. For that reason, that line does nothing. The second line, /resources/views/**/*.blade.php
will "scan" the calendar file
2) When you say you restarted, you mean you ran npm run build/dev
?Hmm..
1) Ik have added now
resources/views/livewire/resources-calendar.blade.php
2) Yes I restarted pm run dev
But no bg-red-500
waitt a second. What is the directory of
tailwind.config.js
?it's in the project root
wrong tailwind config. Try using the one that is in your theme
This one?
oh wait!
Bingo!!

Thanks @Matthew !
No, its under
resources/css/filament
Nicee, you're welcome