Disappearing checks in WordPress checkboxes
In some recent update, before 6.8.1 and still present in 6.8.2, WordPress changed the CSS for checkbox styling from checkbox to none
which, unshockingly, makes it awfully hard to know what a checkbox state is. Most wordpress sites will use the minified css file shipped with wordpress by default, which makes fixing the bug a little more tedious given browser inspectors prettify the minimized code making grepping for the fault a bit more challenging. After some digging around the bug is in the wp-admin/css/forms.css
file and the minified version wp-admin/css/forms.min.css
, and, of course, the RTL versions wp-admin/css/forms-rtl.css
and wp-admin/css/forms-rtl.min.css
.
The offending stanza is readable in the pretty versions as:
input[type="checkbox"], input[type="radio"] { border: 1px solid #8c8f94; border-radius: 4px; background: #fff; color: #50575e; clear: none; cursor: pointer; display: inline-block; line-height: 0; height: 1rem; margin: -.25rem .25rem 0 0; margin-bottom: 0px; outline: 0; padding: 0 !important; text-align: center; vertical-align: middle; width: 1rem; min-width: 1rem; -webkit-appearance: none; box-shadow: inset 0 1px 2px rgba(0,0,0,.1); transition: .05s border-color ease-in-out; }
-webkit-appearance: none;
should be -webkit-appearance: checkbox;
at least if you want to know the state of your checkboxes (you probably do).
A bit tedious to edit the minified versions but nano wp-admin/css/forms.min.css
followed by ESC->SHIFT-4 then searching for min-width:1rem;-webkit-appearance
and changing the following none
to checkbox
did the trick for me. This is the sort of thing that has already persisted for a few versions and may persist for more. Perhaps the devs have customized CSS so they don’t see the problem, so expect to make the change every update for a while.