Icon Color Issues
I'm trying to build a table and so far it works well except for the icons. I am able to change the icon that loads up but the color always stays the same. What could be the issue? Thanks in advance.
Solution:Jump to solution
preset has
darkMode: 'class'
You need to add dark
class to the html..
```html
<html class="dark"......30 Replies
are you using the panel builder or only the table builder?
only the table builder
yes, i just verified all steps.
however I forgot to mention something in the post. Adding the line "presets: [preset]," to my tailwind.config.js completely ruins colors
In the picture, just to the left of the table there is a gray sidebar that breaks when I add the line.
could you share the tailwind.config.js file?
looks good to me.. did you run
npm run dev
?yes, I also restarted my pc just in case that was the problem but its still the same
ive also followed the steps in #✅┊rules
Can you share this code on github?
when you say this code do you mean the entire laravel project?
yes
or a minimal repo to reproduce this issue..
Since this is for work I'd prefer not to release the entire project. I can post all related blade files as well as whatever config files are needed. Just tell me which
You could create a new laravel project with the same setup and share the whole code..
I can do that yes. I'll try to replicate the issue in a new project and get back to you.
this is the livewire component used to render the table
just for the sake of sanity, am I doing it right?
In a new project with only the table builder installed, the issue still exists and it also seems that trying to sort by either columns doesnt work (it doesnt do anything).
looks good, I think it is a tailwind issue, but you need to share the code..
did you add
@filamentStyles
to your layout?Okay, that seems to have partially solved the issue. The icon colors change but the table background turned white. With the way it was worded in the doc, I thought each component loaded app.blade.php so I didn't have to declare the styles in my actual layout file. Am I supposed to extend app.blade.php as my main layout, or can I just have that file and create my own layout to include in my files?
why would every component load app.blade.php? you add styles in your main layout and that's it
yeah looking back im not sure why I thought that.
But now the new issue is this:
As far as I'm aware the background should be dark, but it looks like this.
i think everything here is good
when you hover background should change maybe
it doesnt
hm. have you added
'tailwindcss/nesting': 'postcss-nesting',
to the postcss.config.js
?Yes
so in your layout you have this?
Inside the <head> element yes
no other ideas then, you missed something but what hard to say now
Solution
preset has
darkMode: 'class'
You need to add dark
class to the html..
that fixed it. thanks a lot for your help!