-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Theming: Can't customize design tokens whose value is a css variable #17307
Comments
Hi, as a workaround you can pass it in dt prop of p-toast. |
@imaksp thank you, but I overwrote the variables directly in the css. |
Hi, overriding css var in app style css will also work, but with design token you will also get type safety in future. (currently it uses |
thats true. But for Toast Component it is easy, i have one in my application. But i also need to overwrite --p-select-clear-icon-color. i don't know how much select components are in my application, but there are a lot. I prefere to overwrite this just once. When the issue is fixed, i will remove it. |
hi there, i think we're hitting this too, we're obliged to use
if we remove the can anyone confirm that we shouldn't need to use |
Same here, we are trying to style progressspinner via design tokens using primeng 19.0.5:
If we remove the !important the default colors are still in place. |
Could you please wrap it with
|
thanks @mertsincan this solved it for my case, i thought i had tested that but in retrying indeed for my case i can make the changes without !important. what's a bit strange is that the padding changes made in the |
Describe the bug
It is not possible to customize design tokens whose value is a css variable. The new css variable is created and set in :root, but the previous variable is still there and overwrites the variable created from the design token. It affects all components.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/github-mr4q7kaa?file=src%2Fapp%2Fapp.config.ts
Environment
windows 11
Angular version
19.0.0
PrimeNG version
v19
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
the css variables should not overwrite each other.
The text was updated successfully, but these errors were encountered: