Make WordPress Core

Opened 5 weeks ago

Last modified 7 days ago

#63559 accepted defect (bug)

Buttons on Edit Media screen have smaller height than other buttons

Reported by: hbhalodia's profile hbhalodia Owned by: joedolson's profile joedolson
Milestone: 6.9 Priority: normal
Severity: normal Version: 5.3.1
Component: Media Keywords: has-patch has-test-info has-screenshots commit
Focuses: ui, css, administration Cc:

Description

  • On Edit media screen, we have some buttons which are used to update the media, may be crop, rotate etc, for which the buttons sizes are not consistent are less than other buttons across the admin site.
  • Button such as, Crop, Scale, rotation have 28px height, while the button across site have 30px, which looks odd.
  • When we try to add the crop, we see 2 buttons in line, Apply Crop and Clear Crop, which actually identifies this issue, as both buttons are not aligned and Clear crop button is actually a 2px small, which should not be.
  • CSS which adds this is actually added here, https://github.com/WordPress/wordpress-develop/blob/eeb8fbf81bfc3fe83efd9bc327ac5015211b76b7/src/wp-admin/css/media.css#L974-L980, On changing to 30px, actually resolves the issue.

Attachments (2)

Screenshot 2025-06-12 at 11.35.59 AM.png (744.5 KB) - added by hbhalodia 5 weeks ago.
Button with 28px height
Screenshot 2025-06-12 at 11.35.32 AM.png (754.6 KB) - added by hbhalodia 5 weeks ago.
Button with 30px height

Download all attachments as: .zip

Change History (11)

@hbhalodia
5 weeks ago

Button with 28px height

@hbhalodia
5 weeks ago

Button with 30px height

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


5 weeks ago
#1

  • Keywords has-patch added

#2 @sabernhardt
5 weeks ago

  • Summary changed from Edit Media: Buttons on edit media screen have samll height which are not consitent with other buttons to Buttons on Edit Media screen have smaller height than other buttons
  • Version changed from trunk to 5.3.1

[46326] resized the image editing buttons to show text with the icons, but then [46866] apparently missed standardizing their height.

@hbhalodia commented on PR #8963:


5 weeks ago
#3

Hi @sabernhardt, I have updated the PR to use the 28px line height.

#4 @joedolson
5 weeks ago

  • Milestone changed from Awaiting Review to 6.9
  • Owner set to joedolson
  • Status changed from new to accepted

#5 @sandeepdahiya
5 weeks ago

  • Keywords has-test-info has-screenshots added

Bug Reproduction and Test Report

✅ This report validates that the indicated patch addresses the issue.
Patch tested: Patch-8963.diff

Environment

  • OS: Windows 11 Home
  • Web Server: Nginx 1.27.5
  • PHP: 8.2.28
  • WordPress: 6.9-alpha-60093-src
  • Browser: Mozilla Firefox 139.0.1 (Latest)
  • Theme: Twenty Fourteen
  • Active Plugins:
    • Code Snippets 3.6.8
    • WordPress Beta Tester 3.6.3

Actual Results

  • 🐞 Bug reproduction - On the Media → Edit Image screen, several buttons had inconsistent heights. The "Apply Crop" button was 30px, while other action buttons — "Clear Crop", "Crop", "Scale", and "Rotate" — were only 28px high, resulting in visual misalignment.

Clear crop button 28px
Crop, Scale, Image Rotation - Button 28px
Apply crop button 30px

  • ✅ Issue resolved with patch – It standardizes all related buttons to 30px height, resolving the inconsistency.

Apply Crop, Clear Crop button - 30px
Crop, Scale, Image Rotation - Button 30px

Additional Notes

  • The above patch works smoothly on smaller screen sizes as well.

#6 @mikinc860
5 weeks ago

The solution appears to be working, but it's also affecting other buttons on the same screen. Please ensure that everything remains properly aligned.

Last edited 5 weeks ago by mikinc860 (previous) (diff)

#7 @hbhalodia
4 weeks ago

Hi @mikinc860, Can you please share how it's affecting other buttons, or what other buttons are being affected? It would help in updating the solution.

Thank You,

@mukesh27 commented on PR #8963:


7 days ago
#8

The changes looks good to me.

https://github.com/user-attachments/assets/ef59633e-91b0-4799-b829-8026982a60c4

#9 @mukesh27
7 days ago

  • Keywords commit added

Mark ready for commit.

Note: See TracTickets for help on using tickets.