Tailwind Colour Palette Not working
So in my blade I have the classes accordingly, for example `text-violet-500'. Which is an available tailwind colour.
I've added my view in the tailwind.config.js. And I've tried registering the colour in the ->colors array inside the AdminPanelProvider. But I just cant get it to work
I am running npm run build on each change correctly also.
8 Replies
I know the colours array in the provider is to use with filament components, that was just to try. As I really cant figure out why none of the others are working
Did you create a custom theme?
Yeah, Followed all the steps, added ->vite path etc,
So vite.config.js
Tailwind
->viteTheme('resources/css/filament/admin/theme.css');
ProviderWhere do you use those classes? Did you check the class is applied in the HTML?
Using them directly in the blade
I can see in dev tools that the naming is correct. Just the styles don't appear
Oh. I got it. So it wont work when the colours are in the blade dynamically like I have it currently
Solution
I've have had to add to the safelist key
Btw. you can use Filaments
text-custom-500
and style="{{ get_css_color_variables() }}"
(or similar name) to make use of Filament helpersAble to draft a little example? Im a bit lost in picturing this