Opened 4 years ago
Last modified 4 years ago
#55913 new enhancement
Custom Fields table can have extra-wide checkboxes and radio buttons
| Reported by: | princeofabyss | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | 6.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | css |
Description
In Custom Fields feature, there is an unforeseeable problem in a specific CSS rule defined for div#postcustomstuff.
More specifically there is this defined in wp-admin/css/edit.css:
#postcustomstuff table input, #postcustomstuff table select, #postcustomstuff table textarea {
width: 96%;
margin: 8px;
}
While this works well in the situation the rule was written for, it hides a problem when attempted to reuse the code for other cases, where a checkbox or checkbox or radio button is used, as it stretches them out.
You might want to consider excluding those two from the CSS rule...
#postcustomstuff table input:not([type=checkbox]):not([type=radio]),
Change History (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)

With the more specific selector, that will also need to exclude the submit button. r53168 excludes more button types, and this probably could use something similar:
#postcustomstuff table input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]), #postcustomstuff table select, #postcustomstuff table textarea { width: 96%; margin: 8px; }Wrapping the exceptions inside
:where()might be worth considering as well.