[wp-trac] [WordPress Trac] #59960: Replace em-based `line-height` with unitless values

WordPress Trac noreply at wordpress.org
Mon Jun 10 19:08:56 UTC 2024


#59960: Replace em-based `line-height` with unitless values
-------------------------------------+-------------------------------------
 Reporter:  sabernhardt              |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.7
Component:  Administration           |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  good-first-bug has-      |     Focuses:  css, administration,
  patch needs-testing                |  coding-standards
-------------------------------------+-------------------------------------
Changes (by sabernhardt):

 * milestone:  6.6 => 6.7


Old description:

> Follow-up to #44643
>
> The default `line-height` of `1.4em` can cause issues, at least in the
> iframe-based editor. Other instances probably could be unitless too
> (while keeping their numeric value).
>
> {{{
> body {
>         line-height: 1.4;
> }
> }}}

New description:

 Follow-up to #44643

 The default `line-height` of `1.4em` can cause issues, at least when
 elements within the `body` have a larger font size than their container
 ~~in the iframe-based editor~~. Other instances probably could be unitless
 too (while keeping their numeric value).

 {{{
 body {
         line-height: 1.4;
 }
 }}}

--

Comment:

 I'm not comfortable with changing all of these during beta. I do not even
 know where to find some of these elements.

 To test, compare each admin screen before and after applying the patch.
 First, go to your browser settings and set a minimum font size of 16 to 20
 to discover how the page changes without the unit. Then test again without
 the minimum font size to make sure the difference with the patch is not
 too much (as it seemed for the popular-tags section).

 I had mentioned the iframe-based editor earlier because that is how I
 first noticed the small `line-height`, but I do **not** recommend testing
 PR 5719 in it. The main issue there is that admin body styles should not
 apply at all in the iframe (GB57176).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59960#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list