Make WordPress Core

Opened 6 months ago

Closed 2 months ago

#64937 closed defect (bug) (fixed)

Image editor: scale and crop input size mismatch with button and info icon not using new color

Reported by: huzaifaalmesbah Owned by: wildworks
Priority: normal Milestone: 7.0.1
Component: Media Version:
Severity: normal Keywords: has-patch fixed-major dev-reviewed
Cc: Focuses:

Description

In the Image Editor (Scale and Crop sections), the UI appears inconsistent. Input fields are not using compact styles, button size does not align with inputs, and the info icon uses old color.

Related discussion:
#64759 comment:9
PR #11091 comment

Attachments (1)

Huzaifa-2026032410303057.png (70.5 KB ) - added by huzaifaalmesbah 6 months ago.

Download all attachments as: .zip

Change History (14)

#1 follow-up: @ozgursar
6 months ago

input fields are set to min-height: 40px in /wp-admin/css/forms.css?ver=7.0-beta6-62085-src. Reducing them to 32px might solve the size mismatch.

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
input[type="week"] {
	padding: 0 12px;
	/* inherits font size 14px */
	line-height: 2.71428571; /* 38px for 40px min-height */
	min-height: 40px;
}

https://i.imgur.com/Bc3whMd.png

#2 @huzaifaalmesbah
6 months ago

Expected compact styles Inputs:

min-height: 32px;
line-height: 2.14285714;
padding: 0 8px;

And the info icon should use:

var(--wp-admin-theme-color, #3858e9);

#3 in reply to: ↑ 1 @wildworks
6 months ago

input fields are set to min-height: 40px in /wp-admin/css/forms.css?ver=7.0-beta6-62085-src. Reducing them to 32px might solve the size mismatch.

Please note that the 40px height is intentional and cannot be changed to a default size of 32px. I think we should apply new 40px default size for buttons as well.

#4 @jamesbregenzer
3 months ago

Tested on current trunk (7.1-alpha-62161-src) in Chrome on macOS.

I tested the image editing screen by uploading an image, opening the Scale Image and Crop Image controls, and comparing the layout against the screenshots provided in this ticket.

I was unable to reproduce the issue described. The Scale Image and Crop Image controls appear properly aligned, inputs use consistent sizing, and the info icons appear styled correctly.

It is possible this issue has already been resolved by subsequent admin CSS changes.

#5 @wildworks
3 months ago

  • Milestone Awaiting Review7.0.1

This ticket partially overlaps with #65428. The sizing issues can likely be addressed in #65428. This ticket can focus solely on fixing the old color of the info icon.

This ticket was mentioned in PR #12131 on WordPress/wordpress-develop by @wildworks.


3 months ago
#6

  • Keywords has-patch added

The help icon color in the image editor was hardcoded with classic colors. By replacing this with a CSS variable, it will default to modern colors. Furthermore, the color will appropriately change according to the user's color scheme.

Trac ticket: https://core.trac.wordpress.org/ticket/64937

## Screenshots

Note that the button is intentionally focused to visually display the focus outline.

Header Header
Default https://github.com/user-attachments/assets/051d9c86-7baa-4d40-83d6-6785023df2c7
Fresh https://github.com/user-attachments/assets/f3452ad9-fdd7-4094-af93-f4752d0b32b7
Light https://github.com/user-attachments/assets/b37ac677-3dff-4026-b898-bc5194dbf7d2
Blue https://github.com/user-attachments/assets/d4846842-6e84-4967-a8ae-8f220410ead1
Coffee https://github.com/user-attachments/assets/0876e4ee-a010-4d72-9e22-372278210a34
Ectoplasm https://github.com/user-attachments/assets/acab1bc6-dad7-4d4e-b64b-8f01e63172eb
Midnight https://github.com/user-attachments/assets/cc0d080b-881a-48f9-839d-0b7249a6eb59
Ocean https://github.com/user-attachments/assets/098d84be-bc23-4b5c-a17f-e39c5837b12c
Sunlinse https://github.com/user-attachments/assets/ef99355f-7e19-43a3-9ff5-df855ed227c2

## Use of AI Tools

N/A

#7 @wildworks
3 months ago

  • Owner set to wildworks
  • Resolutionfixed
  • Status newclosed

In 62481:

Media: Make image editor help icon scheme-aware.

The image editor help toggle icon used a hardcoded classic blue color. Replace it with a CSS custom property so the icon follows the user's admin color scheme.

Props dervishov, huzaifaalmesbah, jamesbregenzer, mukesh27, ozgursar, wildworks.
Fixes #64937.

#8 @wildworks
3 months ago

  • Keywords dev-feedback added
  • Resolution fixed
  • Status closedreopened

Reopening #64937 to request backporting [62481] to 7.0.1.

#9 @masteradhoc
3 months ago

  • Keywords fixed-major added

#10 @mirmpro
3 months ago

Tested the backport and everything is working perfectly.

The image editor help icon color changes dynamically as expected when switching through different admin color schemes in the user profile. The CSS custom property implementation successfully adapts the UI without any hardcoded color conflicts.

The fix is solid and ready for the 7.0.1 release.

#11 @masteradhoc
2 months ago

@cbravobernal Could you take care of the backporting for the commits Aki mentioned?

#12 @jorbin
2 months ago

  • Keywords dev-reviewed added; dev-feedback removed

[62481] looks good for backport to 7.0 branch.

#13 @wildworks
2 months ago

  • Resolutionfixed
  • Status reopenedclosed

In 62585:

Media: Make image editor help icon scheme-aware.

The image editor help toggle icon used a hardcoded classic blue color. Replace it with a CSS custom property so the icon follows the user's admin color scheme.

Reviewed by jorbin.
Merges [62481] to the 7.0 branch.

Props dervishov, huzaifaalmesbah, jamesbregenzer, mukesh27, ozgursar, wildworks.
Fixes #64937.

Note: See TracTickets for help on using tickets.