Custom Preset - Badge danger background color not applied unless !important is added #17421
Open
1 of 4 tasks
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
Hi,
I'm facing issue with customizing badge background using definePreset method, unless I add !important to token value. For other components colors I don't need to add !important.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/sltxgtgx?file=src%2Fapp%2Fbadge-severity-demo.html,src%2Fmain.ts
Environment
Windows 11
Angular version
19.0.1
PrimeNG version
v19
Node version
20.18.1
Browser(s)
Chrome 131
Steps to reproduce the behavior
Please find below stackblitz project:
https://stackblitz.com/edit/sltxgtgx?file=src%2Fapp%2Fbadge-severity-demo.html,src%2Fmain.ts
pink color is ignored:
But if I add !important to background value it works:
https://stackblitz.com/edit/sltxgtgx-7fms5ksc?file=src%2Fapp%2Fbadge-severity-demo.html,src%2Fmain.ts
Expected behavior
I think it should work without adding !important to color value, it works this way for other components, for example p-avatar.
The text was updated successfully, but these errors were encountered: