Check if dark mode is enabled
Hello,
Is there a way to check whether the dark mode is enabled or not? why I want this, is to set the correct logo color, I have dark and light logo color
Thanks
14 Replies
using the
dark:
tailwind variantThanks π
But what about blade ? I'm using the brand blade
You can't do it in a blade, render both images one disabled on dark, one enabled on light
Could you please show me an example ? π
It depends where you are showing it, but dark:hidden on the light logo, and dark:visible on the dark logo
Is your logo an SVG ? do you want to change the fillcolor with CSS ? or do you have 2 logos ?
if 2 logos ^ toeknee
Yes I have two logos
Thanks a lot π
No problem π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Define "not working" please. Are both showing all the time? Does it stay light all the time?
You could try with something else besides the logo, e.g.
<div class="text-blue-500 dark:text-red-500">test</div>
, does that work?Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Filament does not use pink as far as I found. Try adding a Div with classes:βh-20 2-20 bg-pink-600β. If you canβt see it and your watcher is running (npm dev) I suggest you go over the documentation on theming until any custom css works. (Aka the div shows up)
I really suggest you do read the documentation tough:
https://filamentphp.com/docs/2.x/admin/appearance#changing-the-brand-logo
It's all there ....
Further down you'll be told how you can extend the filament theme with your own css
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View