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!
Solution:
to include new classes you need to build a custom theme first
Jump to solution
6 Replies
Solution
toeknee
toeknee2d ago
to include new classes you need to build a custom theme first
toeknee
toeknee2d ago
it's fairly simple process, then you can ensure the resources dir is being include in the tailwind build
Grogu
GroguOP2d ago
Thanks @toeknee Do you mind elaborating, apologies
toeknee
toeknee2d ago
Then in the tailwind.config.js for that theme you will have the likes of
content: [
'./app/Filament/**/*.php',
'./app/Filament/Vessel/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./resources/views/filament/vessel/**/*.blade.php',
'./resources/views/filament/pages/*.blade.php',
'./resources/views/filament/pages/**/*.blade.php',
'./resources/views/livewire/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./app/Filament/**/*.php',
],
content: [
'./app/Filament/**/*.php',
'./app/Filament/Vessel/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./resources/views/filament/vessel/**/*.blade.php',
'./resources/views/filament/pages/*.blade.php',
'./resources/views/filament/pages/**/*.blade.php',
'./resources/views/livewire/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./app/Filament/**/*.php',
],
Grogu
GroguOP2d ago
Ahhhh great, thank you @toeknee 🙏

Did you find this page helpful?