Opened 5 days ago
Last modified 15 hours ago
#64763 reviewing defect (bug)
Admin reskin: Remove line-height from input elements
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Administration | Keywords: | admin-reskin good-first-bug needs-refresh |
| Focuses: | Cc: |
Description
The line-height of the input element has a value of 2.71428571 applied to it, making it equal to a height of 40px. This value also seems to affect the height of the background highlight when text is selected. At least, this behavior can be confirmed on Windows OS and Chrome browsers.
I don't know why this line-height value exists, but it's strange to have a highlight background that extends to the full height of the form.
Attachments (1)
Change History (15)
#1
@
4 days ago
- Keywords good-first-bug added
- Version set to trunk
Adding good-first-bug keyword as this issue would be a nice bug to fix for new contributors who never submitted any Core patch yet.
#2
@
4 days ago
@fabiankaegy @joedolson Is there any reason why a line-height value equal to min-height is being applied to form elements? Would simply removing the line-height cause any problems?
This ticket was mentioned in PR #11099 on WordPress/wordpress-develop by @hmrisad.
3 days ago
#3
- Keywords has-patch added
Remove line-height property from URL and week input styles.
Trac ticket: https://core.trac.wordpress.org/ticket/64763
## Use of AI Tools
@hmrisad commented on PR #11099:
3 days ago
#4
Could you please add the ticket URL to the PR description?
Thanks! I’ve added the ticket URL to the PR description.
#5
@
3 days ago
Tested the patch on trunk.
Removing the line-height keeps the 40px height via min-height and improves text alignment/selection. No visual regressions found in admin screen.
Before Patch:
https://postimg.cc/FYXV0Hb0
After Patch:
https://postimg.cc/yJQRp19N
@audrasjb commented on PR #11099:
3 days ago
#7
#8
@
3 days ago
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11099
Environment
- WordPress: 7.0-beta2-61752-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 145.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Steps taken
- Check an input field in Settings > General
- ✅ Patch is solving the problem
Expected result
- Line height is removed from input elements
Screenshots/Screencast with results
This ticket was mentioned in PR #11156 on WordPress/wordpress-develop by @manishxdp.
18 hours ago
#9
## Description
Removes the line-height: 2.71428571 declaration from standard admin input elements. Height remains 40px via min-height; only the line-height is removed.
## Changes
- File:
src/wp-admin/css/forms.css - Removed one
line-heightline from the rule that targetsinput[type="datetime"]throughinput[type="week"](and related types).
## Testing
- Checked inputs on Settings → General and other admin forms.
- Confirmed input height unchanged (40px) and selection highlight no longer fills the full field.
Trac: https://core.trac.wordpress.org/ticket/64763
Fixes #64763
@huzaifaalmesbah commented on PR #11156:
17 hours ago
#10
Thanks for the PR.
I noticed there is already an older PR (#11099) for the same issue and it has been reviewed by a committer. Maybe it would be better to continue contributing there instead of opening a new PR.
@manishxdp commented on PR #11156:
17 hours ago
#11
@huzaifaalmesbah Thanks for review. okay noted
#12
@
17 hours ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11099
Environment
- WordPress: 7.0-beta2-61809
- PHP: 8.3.30
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 145.0.0.0
- OS: macOS
- Theme: Twenty Fourteen 4.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
| Before | After |
|
|
@wildworks commented on PR #11156:
15 hours ago
#13
I’m closing this PR to focus on https://github.com/WordPress/wordpress-develop/pull/11099.
#14
@
15 hours ago
- Keywords needs-refresh added; has-patch removed
Thankyou everyone for working on this ticket.
However it doesn't apply to input fields using "compact" styles:
As mentioned here, there's probably more than one thing that needs to be fixed. Let's try to investigate as much as possible where this problem is occurring.




The background when text in an input element is selected. Comparison of the current style and my proposed style.