Make WordPress Core

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#66294 closed defect (bug) (fixed)

Administration: Misaligned elements after changing body `line-height` to unitless in common.css

Reported by: wildworks Owned by: afercia
Priority: normal Milestone: 7.2
Component: Administration Version: trunk
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

[63965] changed the body line-height in common.css from 1.4em to 1.4. With 1.4em, the computed value (18.2px) was inherited as a fixed value; with 1.4, each descendant now uses its own font-size × 1.4.

As far as I have checked, the following two are clear visual bugs. Other screens show slight layout shifts, but I think those are acceptable.

  1. Classic Editor: the post title placeholder (#title-prompt-text) is shifted down inside the title field.
  2. Theme/Plugin File Editor: the folder toggle arrows in the file tree (e.g. "assets ▸") are no longer vertically aligned with the folder name.

Attachments (2)

1-title-placeholder.png​ (33.3 KB ) - added by wildworks 4 weeks ago.
2-theme-editor-folder-arrow.png​ (117.6 KB ) - added by wildworks 4 weeks ago.

Download all attachments as: .zip

Change History (5)

This ticket was mentioned in ​PR #14218 on ​WordPress/wordpress-develop by ​@iamadisingh.


4 weeks ago
#1

  • Keywords has-patch added

63965 changed the body line-height in common.css from 1.4em (fixed 18.2px) to unitless 1.4, so descendants now compute their own font-size × 1.4. Two elements that relied on the old fixed value are misaligned:

  1. Classic Editor title placeholder (#title-prompt-text): text shifted down inside the title field. Fixed with line-height: 1, matching #title.
  2. Theme/Plugin File Editor folder arrows ([role="treeitem"] span[aria-hidden]): arrow no longer aligned with the folder name. Fixed with line-height: 1.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 5.5
Used for: Locating the affected selectors

#2 @afercia
4 weeks ago

  • Owner set to afercia
  • Resolution → fixed
  • Status new → closed

In 64328:

Administration: Adjust line-height values after change to the body line-height.

Follow-up to [63965], which changed the body line-height in common.css from 1.4em to 1.4 to adapt to the WordPress CSS Coding Standards.

  • Adjusts the line height for the Classic Editor post title 'placeholder'.
  • Adjusts the line height for arrow icons in the Plugin and Theme file editors.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/14218

Props iamadisingh, wildworks.
See #65898.
Fixes #66294.

#3 @sabernhardt
4 weeks ago

  • Milestone Awaiting Review → 7.2

Related: #59960

Note: See TracTickets for help on using tickets.