F
Filament2mo ago
Mook

Notification transparency

In Filament v4, the success notification seems to have had the transparency cranked right up which makes it really hard to read. See image. How can I alter the opacity in my theme file while preserving the colour?
No description
5 Replies
awcodes
awcodes2mo ago
Sorry but I think something in you app is creating a conflict. The notifications in filament are not this transparent.
Mook
MookOP2mo ago
It seems to be that if you add a ->color attribute to the notification it adds transparency. I use custom colours but I commented them all out and it still happens. I do have a custom theme but there is zero CSS in there currently.
Notification::make()
->icon('heroicon-o-information-circle')
->title('Aggregate score calculated')
->body('Aggregate score: (' . $related_result->aggregate_home_goals . ' - ' . $related_result->aggregate_away_goals . ')')
->color('info')
->seconds(20)
->success()
->send();
Notification::make()
->icon('heroicon-o-information-circle')
->title('Aggregate score calculated')
->body('Aggregate score: (' . $related_result->aggregate_home_goals . ' - ' . $related_result->aggregate_away_goals . ')')
->color('info')
->seconds(20)
->success()
->send();
awcodes
awcodes2mo ago
What do you mean by your custom theme has zero css in it?
Mook
MookOP2mo ago
By that I mean I've created a custom theme but haven't added anything past what is created in these steps: https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme
awcodes
awcodes2mo ago
Thinking it might be a conflict maybe with color() and success(), success sets a color.

Did you find this page helpful?