#64822 closed defect (bug) (fixed)
Fix checked checkboxes in admin color schemes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Administration | Keywords: | has-patch admin-reskin |
| Focuses: | css, administration | Cc: |
Description
[61645] set the checkboxes' check mark and radio buttons' dot to white against the theme's background color.
However, _admin.scss only used the newer syntax for CSS content (see #64350) and did not remove the SVGs that specify the variables.$form-checked color. As a result, color schemes other than Fresh override the white check mark in old browsers.
Attachments (1)
Change History (12)
This ticket was mentioned in PR #11194 on WordPress/wordpress-develop by @sabernhardt.
6 weeks ago
#1
- Keywords has-patch added
Removes CSS for the checked states of both checkboxes and radio buttons from _admin.scss. The white color used in all schemes is already defined in forms.css:
input[type="checkbox"]:checked::before {
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E");
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") / '';
}
Use of AI Tools: none (by me)
#3
@
6 weeks ago
If there is any reason to expect a different rule between core's forms and colors stylesheets in the cascade, _admin.scss could keep the redundant rulesets like in my fork. (I could submit that as a pull request to consider for an alternative option.)
This ticket was mentioned in PR #11198 on WordPress/wordpress-develop by @sabernhardt.
6 weeks ago
#4
Alternative option: fix the checkbox style in _admin.scss, setting the check mark to white again (even though it is already white in forms.css).
Use of AI Tools: none (by me)
#6
@
5 weeks ago
- Keywords commit added
I have a strong preference for removing CSS over adding redundancy, and haven't yet been able to think of a good reason to have those colors be different in the stack.
Given that, I'm going to mark this for commit and commit the changes in PR11194. This can easily be changed during RC if we find that there are cases we didn't consider, but removing unneeded CSS is significantly preferable to me.
#7
@
5 weeks ago
- Keywords commit removed
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11198
Environment
- WordPress: 7.0-beta4-61919-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Firefox 115.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Steps taken
- Use an older browser like Firefox 115
- Go to Users > Profile
- Confirm that the white checkmark is not white
- Apply patch
- Go to Users > Profile
- Confirm that the checkmark is white
- ✅ Patch is solving the problem
Expected result
- We expect to see the which checkmark against the background set in admin color scheme
Screenshots/Screencast with results
#8
@
5 weeks ago
@joedolson I accidentally removed the keyword commit while submitting my patch test
Could you add back please?
@sabernhardt commented on PR #11194:
5 weeks ago
#10
Committed in r61940




checkboxes in Modern scheme on the Profile page, using Firefox 115