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
Did you include the logo path in the tailwind build
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
It’s not. Therefore you will need to setup a custom theme and have it build against your views too.
is there any tutorial about how to build it against my views?
For an image too, make it transparent and condition the background.