Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Preset - Badge danger background color not applied unless !important is added #17421

Open
1 of 4 tasks
GitJacek opened this issue Jan 17, 2025 · 0 comments
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

Comments

@GitJacek
Copy link

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

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

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:

Image

But if I add !important to background value it works:

Image

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.

@GitJacek GitJacek added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant