Custom widget not read Tailwindcss classes

Hi everyone, i' ve this simple custom widget:
php
<x-filament-panels::page>
<x-filament::section>
<x-filament::card>
@if ($quote)
<blockquote class="text-xl italic text-gray-700">
“{{ $quote->quote }}”
</blockquote>

<p class="mt-2 text-sm self-end text-red-500">
— {{ $quote->user->name }}
</p>
@else
<p>No quote.</p>
@endif
</x-filament::card>
</x-filament::section>
</x-filament-panels::page>
php
<x-filament-panels::page>
<x-filament::section>
<x-filament::card>
@if ($quote)
<blockquote class="text-xl italic text-gray-700">
“{{ $quote->quote }}”
</blockquote>

<p class="mt-2 text-sm self-end text-red-500">
— {{ $quote->user->name }}
</p>
@else
<p>No quote.</p>
@endif
</x-filament::card>
</x-filament::section>
</x-filament-panels::page>
but i can't figure out why the classes weren't applied once browser loaded. are you experiencing it too? PS: the same code in v3 works!
5 Replies
Dennis Koch
Dennis Koch6d ago
but i can't figure out why the classes weren't applied once browser loaded. are you experiencing it too?
Do you have a theme? Did you recompile your theme? If not, follow the docs and create one. Tailwind needs to be compiled to include the classes you are using.
vmontro
vmontroOP6d ago
I don't have a theme...is it necessary? How can I use Tailwind's CSS classes?
Dennis Koch
Dennis Koch6d ago
Yes, you need one. That's what I just wrote.
vmontro
vmontroOP6d ago
Mh okay thanks ♥️
Dennis Koch
Dennis Koch6d ago
If you have any issue with the theme, let me know.

Did you find this page helpful?