Using colours in a blade file
I'm trying to use the
bg-green-300
colour in my blade file.
I can see the style is being applied in inspect element but the circle is not appearing. As if the colour isn't being applied.
My tailwind.config.js
13 Replies
Is the w-4 h-4 working and or is the circle just getting squished by the span since it’s a flex container.
Personally, I would forgo the safelist unless you actually need it and just make sure the view is included in the content array.
Yes the w-4 and h-4 is working. And the bg-gray-400 is working

The 6's circle is showing as bg-green-300 in inspect element
And the path is also included in the content array
Can you give me a screen shot of the css class in devtools? The class definition, not the html.

Hmm, there’s no bg-green in the stylesheet. That’s weird. Is that the tailwind.config.js for your custom theme?
Ie, you do have a custom theme for the panel, correct?
Yes I have a custom theme
It only has this in it
Its linked in my AppServiceProvider
Custom themes should be registered through the panel.
Or am I wrong assuming you are using the panels package and this is standalone filament package usage?
I'm a bit confused 😂 , but I am using an Admin panel and have an AdminPanelProvider so i'm guessing i am using a panels package. Should i be regestering it like this but with the custom.css underneath that line?
Follow the instructions in the link. Then finish it with the instructions output in the terminal.
I would still think what you are doing would work, but either your css file isn’t getting loaded or the content paths are off.
But doing the custom theme the right way will prevent bloat and issues with needing !important