WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 5 months ago

#46530 closed defect (bug) (fixed)

CSS line-height values should be unitless - media.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:
PR Number:

Description

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-admin/css/media.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:

Unchanged line-height values that use units (I could not find a good unitless solution that would work across all browsers and admin pages)

line 1255 - .edit-attachment-frame .edit-media-header .right:before, .edit-attachment-frame .edit-media-header .left:before

Unable to find selectors in the DOM

line 162 - .media-item .progress (couldn't keep it on the page long enough to inspect it)
line 187 - .media-item .progress .percent (same as above)

Attachments (2)

46530.diff (1.5 KB) - added by ianbelanger 7 months ago.
46530.1.diff (1.5 KB) - added by ianbelanger 6 months ago.
Updates patch with more precise line-height calculations

Download all attachments as: .zip

Change History (8)

@ianbelanger
7 months ago

#1 @ianbelanger
7 months ago

  • Component changed from General to Media

#2 @joemcgill
6 months ago

  • Milestone changed from Awaiting Review to 5.3

HI @ianbelanger. Similar to #46529, I think this would be a nice update.

#3 @mukesh27
6 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
6 months ago

Updates patch with more precise line-height calculations

#4 @SergeyBiryukov
5 months ago

/* This does not belong here, it has nothing to do with media */
#poststuff .inside .the-tagcloud {
	…
}

Originally introduced in [9518], accidentally ended up in Media section after the reorganization in [16136].

Same for these styles for the update form in wp-admin/update-core.php:

ul#dismissed-updates {
	display: none;
}

form.upgrade {
	margin-top: 8px;
}

form.upgrade .hint {
	font-style: italic;
	font-size: 85%;
	margin: -0.5em 0 2em 0;
}

They ended up accidentally duplicated in both Notifications and Media sections as part of the same reorganization. They still exist in wp-admin/css/common.css, the duplicates can be removed.

#5 @SergeyBiryukov
5 months ago

In 45483:

Media: Move tag cloud styles that accidentally ended up in Media section after the reorganization in [16136] to a more appropriate place.

Remove styles for wp-admin/update-core.php accidentally duplicated in Media section as part of the same reorganization.

See #46530.

#6 @SergeyBiryukov
5 months ago

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

In 45484:

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

Props ianbelanger, mukesh27, pbiron, afercia.
Fixes #46530. See #44643.

Note: See TracTickets for help on using tickets.