Tailwind dark:hidden doesn't work

Hi, i'm trying to have two versions of the logo by using the dark:hidden class on Filament v3, but it doesn't work. Here's the code: <img src="{{ asset('/images/logo.svg') }}" alt="Logo" class="block dark:hidden h-9"> <img src="{{ asset('/images/logodark.svg') }}" alt="Logo" class="hidden dark:block h-9"> Any hint?
6 Replies
toeknee
toeknee15mo ago
Did you include the logo path in the tailwind build
Matheeus
MatheeusOP15mo ago
Nope, I get the logo from Laravel public storage. The classes are present when I inspect code on browser, but seems doesn't have any effect Both images displays What I want to achieve is to hide something when dark mode is enabled, but it seems like the dark:[propriety] classes of Tailwind doesn't work in Filament, it's strange
awcodes
awcodes15mo ago
It’s not. Therefore you will need to setup a custom theme and have it build against your views too.
Matheeus
MatheeusOP15mo ago
is there any tutorial about how to build it against my views?
toeknee
toeknee15mo ago
For an image too, make it transparent and condition the background.
Want results from more Discord servers?
Add your server