F
Filamentβ€’12mo ago
ericmp

Why tailwind doesnt work in filament pages?

i created a page:
php artisan make:filament-page Settings
php artisan make:filament-page Settings
then i added this in the view:
<x-filament-panels::page>
<p class="bg-red-500">
should i be red?
</p>
</x-filament-panels::page>
<x-filament-panels::page>
<p class="bg-red-500">
should i be red?
</p>
</x-filament-panels::page>
but i dont see it red. i did npm run build to test if that fixes it, but doesnt
No description
8 Replies
ericmp
ericmpOPβ€’12mo ago
in the overview in the docs says "Filament allows you to create completely custom pages for the app". does that include using css classes? (https://filamentphp.com/docs/3.x/panels/pages)
Disouric
Disouricβ€’12mo ago
You need to create a custom theme since bg-red-500 is not in the default theme https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
ericmp
ericmpOPβ€’12mo ago
oh i see. hmm. and there is any way to allow all tailwind classes?
Disouric
Disouricβ€’12mo ago
Why would you want it? That makes the CSS file bloated with classes you don't use.
ericmp
ericmpOPβ€’12mo ago
u r right πŸ€”
Disouric
Disouricβ€’12mo ago
Create a custom theme and build the theme whenever you change some classes around. You could use npm run dev for development
ericmp
ericmpOPβ€’12mo ago
ill do that yeah, thanks πŸ‘
Disouric
Disouricβ€’12mo ago
np
Want results from more Discord servers?
Add your server