Color problems - dynamic classes and custom palettes
I'm doing this:
In my
AppServiceProvider
. Some colors don't seem to work. For example, "sky" in general doesn't work, but also green-400 doesn't work, but green-500 does. I'm storing the classes in the database and echoing them out when the page renders, which I recall reading causes problems with tailwind since it doesn't see the classes when compiling. I can't seem to remember how to get around the problem though.
ALSO - in other cases, like "mwNavy", I tried using that by just hard-coding the class and it doesn't work either. Do I have to add these to tailwind in addition to using FilamentColor::register()
?Solution:Jump to solution
the dynamic css problem is solved at least:
https://tailwindcss.com/docs/content-configuration#dynamic-class-names...
Content Configuration - Tailwind CSS
Configuring the content sources for your project.
2 Replies
Solution
the dynamic css problem is solved at least:
https://tailwindcss.com/docs/content-configuration#dynamic-class-names
Content Configuration - Tailwind CSS
Configuring the content sources for your project.
I just removed my custom colors from the FilamentColor::register() method and put them back in my tailwind config file and now it's working.