Checkbox: Regression, custom styling of checkbox active state no longer working
See original GitHub issueDescribe the defect The custom styling for a checkbox actiove state is no longer working. I am no CSS expert, but I had to add an additional attribute selector to bring it back into working order.
Reproducer n/a
Environment:
- PF Version: 10.0 Snapshot
- JSF + version: _e.g. Mojarra 2.3.9
- Affected browsers: e.g. Chrome, iOS, ALL
To Reproduce
Expected behavior
// PF 8.0
.ui-chkbox-box.ui-state-active {
border-color: #007ad9;
background-color: #007ad9;
color: #000;
}
// PF 10.0
.ui-chkbox-box.ui-state-active, .ui-chkbox-box[aria-checked='true'] {
border-color: #007ad9;
background-color: #007ad9;
color: #000;
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (20 by maintainers)
Top Results From Across the Web
CSS: Custom check box not working - Stack Overflow
CSS : Custom check box not working ... I have a basic custom check box and I need the box to change state...
Read more >The "Checkbox Hack" (and things you can do with it)
Using a hidden checkbox, you can re-create a lot of functionality on website that rely on clicks and toggled states. Fair warning, it's...
Read more >Pure CSS Custom Checkbox Style
We'll create custom, cross-browser, theme-able, scalable checkboxes in pure CSS. We'll use `currentColor`, the `em` unit, SVG, and CSS grid ...
Read more >Checkbox - Lightning Design System
As SLDS checkboxes rely on the :checked pseudo selector, and the indeterminate state is only accessible via JavaScript, the use of a CSS...
Read more >How To Select The Check Box In Selenium With Examples
The checkbox can be turned on or off (that is checked or unchecked). A checked Checkbox is the one that is seen as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it should be different when selected and selected+focus. Same background, but focus should highlight it with another border. This makes 3 different selectors: .ui-state-focus .ui-state-active .ui-state-active.ui-state-focus
We need to review all checkbox and radio buttons;
https://github.com/primefaces/primefaces/issues/7052