WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 4 weeks ago

#46529 reopened defect (bug)

CSS line-height values should be unitless - media-views.css

Reported by: ianbelanger Owned by: ianbelanger
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch needs-testing good-first-bug
Focuses: ui, administration, coding-standards Cc:

Description (last modified by ianbelanger)

As outlined in #44643, CSS line-height values should be unitless unless necessary to be defined as a specific pixel value. It was suggested that we break up 44643 by stylesheet in order to better track them.

This ticket covers much of wp-includes/css/media-views.css, see patch notes below

Note: The patch was tested only on a Windows machine in Chrome, Firefox, IE11 and Edge. As per https://core.trac.wordpress.org/ticket/44643#comment:23 it should probably be tested on other OS's and supported browsers.

Patch Notes:

Unable to find selectors in the DOM. These may no longer exist in Core, but I am not 100% sure about that.

line 328 - .media-sidebar .sidebar-title
line 1139 - .attachments-browser .instructions

Attachments (3)

46529.diff (2.3 KB) - added by ianbelanger 3 months ago.
46529.1.diff (2.4 KB) - added by ianbelanger 8 weeks ago.
Updates patch with more precise line-height calculations
instructions.png (70.0 KB) - added by afercia 4 weeks ago.

Download all attachments as: .zip

Change History (9)

@ianbelanger
3 months ago

#1 @ianbelanger
3 months ago

  • Description modified (diff)

#2 @ianbelanger
3 months ago

  • Component changed from General to Media

#3 @joemcgill
2 months ago

  • Milestone changed from Awaiting Review to 5.3

Hi @ianbelanger. I'd be happy to see this change land. Thanks for the patch!

#4 @mukesh27
2 months ago

I tested attached patch successfully without any error in Ubuntu 18.04.2 LTS with Google Chrome Version 73.0.3683.75 and Firefox Version 65.0.1

@ianbelanger
8 weeks ago

Updates patch with more precise line-height calculations

#5 @SergeyBiryukov
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 45478:

CSS Coding Standards: Use unitless values for line-height in wp-includes/css/media-views.css.

Props ianbelanger, pbiron, afercia.
Fixes #46529. See #44643.

#6 @afercia
4 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

line 328 - .media-sidebar .sidebar-title
line 1139 - .attachments-browser .instructions

.attachments-browser .instructions is still used for the instructions that appear in the edit gallery view, edit playlist view, and for example in the Customizer when setting a header image. See attached screenshot.

Re: .media-sidebar .sidebar-title after some software archeology, I think it's a leftover, as well as sidebar-content and .media-sidebar .search and these rules can be safely removed.

They were introduced in [22321] for the first implementation of the media sidebar. Then removed right after in [22362]. Also, as far as I can tell there's no search in the sidebar.

@afercia
4 weeks ago

Note: See TracTickets for help on using tickets.