Page MenuHomePhabricator

Font modes: Use `line-height-content` on `.vector-body`
Closed, ResolvedPublic

Description

Background

With T394722: Font modes: Introduce a unitless "line-height-content" token in, we also have to make use of it.

Goal

  1. Ensure that Vector's content area (.vector-body) is using a unitless line-height token in order to prevent running into issues like T394305: 1.45.0-wmf.1: When setting font size to "small", line-height is absolute, making lines with larger font-size cramped again, while also containing being overly prescriptive on font-size/line-height settings to development teams
  2. Ensure that there's only intended visual change before/after and only in Vector content area, as it's currently the only selector relying on CSS custom properties.

Dev notes

Jon Robson mentioned that .vector-body was born out of a compromise to ensure Editing software is not affected by the font modes. We might be able to revisit this compromise and generalize the approach better in near future.

Vector 2022 .vector-bodyline-height beforeafter
font size small ~=14px1.5714285 (22px)1.5714285 (22px)
font size medium ~=16px1.6 (25.6px)1.625 (26px)
font size large ~=20px1.5 (30px)1.55 (31px)

Acceptance criteria for done

  • Implement line-height-content on .vector-body
  • Ensure in testing that there are no unintended side-effects

Event Timeline

Change #1148484 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/skins/Vector@master] styles: Replace `line-height-base` with fine-tuned `line-height-content`

https://gerrit.wikimedia.org/r/1148484

Heads up @ovasileva - not sure how to file on our board as I'm assuming the work is being handled by DST

Test wiki created on Patch demo by EGardner (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/7aa598f12d/w/

Test wiki created on Patch demo by EGardner (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/19abcf333d/w/

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/19abcf333d/w/

Test wiki created on Patch demo by EGardner (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/b0226e7578/w/

Heads up @ovasileva - not sure how to file on our board as I'm assuming the work is being handled by DST

Thanks for flagging @SToyofuku-WMF! Indeed handled by us, but review capabilities are welcome.

Test wiki created on Patch demo by Volker E. (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/f6d7eb37f0/w/

Volker_E updated the task description. (Show Details)

Change #1148484 merged by jenkins-bot:

[mediawiki/skins/Vector@master] styles: Replace `line-height-base` with fine-tuned `line-height-content`

https://gerrit.wikimedia.org/r/1148484

CCiufo-WMF updated the task description. (Show Details)

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org//wikis/7aa598f12d/w/

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org//wikis/b0226e7578/w/

Test wiki on Patch demo by Volker E. (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org//wikis/f6d7eb37f0/w/