Make WordPress Core

Opened 13 hours ago

Last modified 8 hours ago

#66294 new defect (bug)

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

Reported by: wildworks Owned by:
Priority: normal Milestone: Awaiting Review
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 13 hours ago.
2-theme-editor-folder-arrow.png​ (117.6 KB ) - added by wildworks 13 hours ago.

Download all attachments as: .zip

Change History (3)

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


8 hours 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

Note: See TracTickets for help on using tickets.