Page MenuHomePhabricator

Font modes: Update line height tokens in skins and features
Open, Needs TriagePublic

Description

In T389900, we added hard-coded values for line-height-xx-small and line-height-medium in Vector 2022, Vector, MinervaNeue, and Monobook to avoid breaking layouts with the Codex 2.0 release. To resolve T394305, we also added a hard-coded value for line-height-small in the 3 skins.

After Codex v2.0.0 is released, we need to update certain line height tokens in skin and feature code to use the correct token in the new line height scale:

ProjectLine-height tokenFont-size tokenIntended line-height token from font modes patch
Skin:Vectorline-height-xx-smalln/aline-height-xxx-large
line-height-xx-smalln/aline-height-xxx-large
line-height-xx-smalln/aline-height-xxx-large
line-height-mediumn/aunknown
Skin:MinervaNeueline-height-xx-smalln/aunknown
Skin:Mirageline-height-mediumn/aunknown
line-height-mediumn/aunknown
line-height-mediumn/aunknown
New Lexeme formline-height-mediumn/aunknown
line-height-mediumn/aunknown
Extension:CampaignEventsline-height-xxx-smallfont-size-mediumline-height-xx-small
line-height-x-smallfont-size-smallline-height-xx-small
Extension:GrowthExperimentsline-height-xx-smallfont-size-x-smallline-height-xxx-small
line-height-mediumfont-size-baseunknown
Extension:CodeMirrorline-height-xx-smalln/aunknown
Extension:Kartographerline-height-xx-smalln/aunknown
line-height-mediumn/aunknown
Extension:MediaSearchline-height-xx-smalln/aunknown
Extension:WikiLambdaline-height-x-smallfont-size-largeline-height-large
line-height-mediumn/aunknown
line-height-mediumn/aunknown
line-height-mediumn/aunknown
line-height-mediumn/aunknown
Extension:CommunityConfigurationline-height-smalln/aunknown
Extension:ReportIncidentline-height-mediumn/aunknown
line-height-mediumn/aunknown
Extension:WikibaseLexemeline-height-mediumn/aunknown

It's possible that some or many of these instances where the font-size is not explicitly listed are already an intended combination. We would need to verify what the font-size is in these instances to determine the correct line-height.

Additionally, there are a couple instances in Vector where certain tokens are being overwritten to account for adjustments based on user preferences in the Appearance/Text size settings. These instances (such as this one) do not need to be changed at this time, but are exactly the places where font modes could are intended to be used in place of this.

Potential issues

Note that removing the line-height overrides in the skins will cause a recurrence of T394305 unless we find another workaround.


Acceptance criteria

  • Determine how to prevent further issues caused by using rem-based line-height tokens instead of unitless
  • Go through each token usage, determine what to do, and open a patch if needed
  • Merge all patches, meaning all uses of these line height tokens is now correct and in line with the new scale