Cannot recolor background of selectbutton #17225
Labels
Component: Theme
Issue or pull request is related to Theme
Status: Pending Review
Issue or pull request is being reviewed by Core Team
Milestone
Describe the bug
A SelectButton that is a child of a toolbar does not have the theme tokens necessary to recolor its background. When attempting to recolor via the child ToggleButton's of the SelectButton, their colors are overridden somewhere, but unclear where. The end result is that the default surface color is used instead.
(Note that a SelectButton doesn't have the available keys to recolor its background - I tried targetting the ToggleButtons, but that doesn't seem to work)
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/github-jfttsfu2?file=src%2Fapp%2Fapp.config.ts
Environment
Angular CLI: 19.0.6
Node: 22.9.0
Package Manager: npm 10.8.3
OS: win32 x64
Angular version
Angular CLI: 19.0.6
PrimeNG version
v19
Node version
Node: 22.9.0
Browser(s)
Firefox 133
Steps to reproduce the behavior
Create a custom preset theme, and specify a background color for the ToggleButton component:
On build, the background is not the correct color. Although the colors are added to object, they are overridden with the surface colors.
Expected behavior
Background of the component should be the color specified, and there should be a way to directly target the background color of a SelectButton, not just by looking at its ToggleButton children.
Edit: Sorry, menubar being part of the theme is unrelated to this issue - that was a part of the theme from my file I forgot to strip out. The SelectButton is inside a Toolbar, not a Menubar, so there should be no effect there.
The text was updated successfully, but these errors were encountered: