ToggleButton bug: incorrect background color when not checked (value=false) PrimeNG 9.0.6-9.1.2
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior Checked and unchecked ToggleButton has blue background color: https://www.primefaces.org/primeng/showcase/#/togglebutton
Expected behavior Unchecked ToggleButton should be gray: https://www.primefaces.org/primeng/v8.2.5-lts/#/togglebutton
Minimal reproduction of the problem with instructions Reproduced here: https://www.primefaces.org/primeng/showcase/#/togglebutton Bug was introduced in PrimeNG 9.0.6
-
Angular version: 9.1.3
-
PrimeNG version: 9.1.0
ToggleButton v8-v9.0.5:

ToggleButton v9.0.6-v9.1.0:

The same
Still not working in PrimeNG 9.1.2: https://www.primefaces.org/primeng/showcase/#/togglebutton Button is blue in both states (checked and unchecked) By the way, on hover button colors are correct: blue when checked and gray when unchecked. It is obviously a bug and I regret that it is ignored by developers.
I suspect this is very low prio for them (seeing there are 600+ open issues) but, until a PR fixes this, we can style the button manually: CSS:
.toggle-button-patch {
border: 1px solid #c8c8c8 !important;
.ui-button-text.ui-unselectable-text {
background-color: #c8c8c8;
color: #333333;
}
}
HTML:
<p-toggleButton [styleClass]="isActive ? '' : 'toggle-button-patch'" ...
Fixed in https://github.com/primefaces/primeng/commit/2fb9cec91ca7fef80feda2cd0f485ca151fccbfa