Page MenuHomePhabricator

Evaluate the design of the revised Codex type scale
Closed, ResolvedPublic

Description

Background

As a part of T363845 and the work around creating a revised and uniform Codex type scale, we want to verify that the changes to the type scale have been vetted with the Web team.

Goals

  • Create a uniform type scale that can be used in Vector and Minerva across the user-based font-size options in the Appearance settings for articles, unifying the 6 (Vector Small, Vector Standard, Vector Large, Minerva Small, Minerva Medium, Minerva Large) user-based font-size options into 4 (Small, Default/Standard/Medium, Large, X-Large).
  • Maintain little to no noticeable changes for the 14px and 16px font-size options.
  • Scale all headings, including the article title proportionally with the body, and equally across all 4 font-size options.

Questions

  1. Are there any glaring concerns with the updates to the type scale?
  2. Are there any nuanced places where typography scales with the Appearance settings that we might not be thinking about?
  3. Is there any reason we wouldn't want to scale the headings in Minerva as we do in Vector (they do not currently scale in Minerva as seen in the audit below, but they do in Vector)?

Audit/Proposal

VectorMinerva
SmallStandardLargeStandardMediumLarge
CurrentNewCurrentNewCurrentNewCurrentNewCurrentNewCurrentNew
h128.8/39.6 (collapsed 24/24)26/3628.8/39.6 (collapsed 24/24)28/3828.8/39.6 (collapsed 24/24)32/4227.2/37.428/3827.2/37.430/4027.2/37.432/42
h221/28.87522/3224/3324/3430/41.2528/3824/3324/3424/3326/3624/3328/38
h316.8/26.8818/2819.2/30.7220/3024/38.424/3419.2/26.420/3019.2/26.422/3219.2/26.424/34
h414/22.414/2216/25.616/2620/3220/3016/2216/2616/2218/2816/2220/30
h514/22.414/2216/25.616/2620/3220/3016/2216/2616/2218/2816/2220/30
h614/22.414/2216/25.616/2620/3220/3016/2216/2616/2218/2816/2220/30
body14/22.414/2216/25.616/2620/3020/3016/26.416/2618/28.818/2820/3020/30
small12.6/19.812/2014.4/23.0414/2218/2718/2814.4/23.7614/2214.4/23.0416/2614.4/21.618/28

To prototype this type scale in Vector, insert the following code into your vector-2022.css file:

.vector-feature-custom-font-size-clientpref-0 .vector-body {
    font-size: 14px;
    line-height: 22px;
}

.vector-feature-custom-font-size-clientpref-0 .mw-body h1, .vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading1, .vector-feature-custom-font-size-clientpref-0 .mw-body-content h1, .vector-feature-custom-font-size-clientpref-0 .mw-body-content .mw-heading1, .vector-feature-custom-font-size-clientpref-0 h1 {
    font-size: 26px;
    line-height: 36px;
}

.vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading2, .vector-feature-custom-font-size-clientpref-0 .mw-body h2, .vector-feature-custom-font-size-clientpref-0 h2 {
    font-size: 22px;
    line-height: 32px;
}

.vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading3, .vector-feature-custom-font-size-clientpref-0 .mw-body h3, .vector-feature-custom-font-size-clientpref-0 h3 {
    font-size: 18px;
    line-height: 28px;
}

.vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading4, .vector-feature-custom-font-size-clientpref-0 .mw-body h4, .vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading5, .vector-feature-custom-font-size-clientpref-0 .mw-body h5, .vector-feature-custom-font-size-clientpref-0 .mw-body .mw-heading6, .vector-feature-custom-font-size-clientpref-0 .mw-body h6, .vector-feature-custom-font-size-clientpref-0 h4, .vector-feature-custom-font-size-clientpref-0 h5, .vector-feature-custom-font-size-clientpref-0 h6 {
    font-size: 14px;
    line-height: 22px;
}

.vector-feature-custom-font-size-clientpref-0 #siteSub {
    font-size: 12px;
    line-height: 20px;
}

.vector-feature-custom-font-size-clientpref-0 .mw-parser-output .reflist {
    font-size: 12px;
    line-height: 20px;
}

.vector-feature-custom-font-size-clientpref-1 .vector-body {
    font-size: 16px;
    line-height: 26px;
}

.vector-feature-custom-font-size-clientpref-1 .mw-body h1, .vector-feature-custom-font-size-clientpref-1.mw-body .mw-heading1, .vector-feature-custom-font-size-clientpref-1.mw-body-content h1, .vector-feature-custom-font-size-clientpref-1.mw-body-content .mw-heading1, .vector-feature-custom-font-size-clientpref-1 h1 {
    font-size: 28px;
    line-height: 38px;
}

.vector-feature-custom-font-size-clientpref-1 .mw-body .mw-heading2, .vector-feature-custom-font-size-clientpref-1.mw-body h2, .vector-feature-custom-font-size-clientpref-1 h2 {
    font-size: 24px;
    line-height: 34px;
}

.vector-feature-custom-font-size-clientpref-1 .mw-body .mw-heading3, .vector-feature-custom-font-size-clientpref-1.mw-body h3, .vector-feature-custom-font-size-clientpref-1 h3 {
    font-size: 20px;
    line-height: 30px;
}

.vector-feature-custom-font-size-clientpref-1 .mw-body .mw-heading4, .vector-feature-custom-font-size-clientpref-1.mw-body h4, .vector-feature-custom-font-size-clientpref-1.mw-body .mw-heading5, .vector-feature-custom-font-size-clientpref-1.mw-body h5, .mw-body .mw-heading6, .vector-feature-custom-font-size-clientpref-1.mw-body h6, .vector-feature-custom-font-size-clientpref-1 h4, .vector-feature-custom-font-size-clientpref-1 h5, .vector-feature-custom-font-size-clientpref-1 h6 {
    font-size: 16px;
    line-height: 26px;
}

.vector-feature-custom-font-size-clientpref-1 #siteSub {
    font-size: 14px;
    line-height: 22px;
}

.vector-feature-custom-font-size-clientpref-1 .mw-parser-output .reflist {
    font-size: 14px;
    line-height: 22px;
}

.vector-feature-custom-font-size-clientpref-2 .vector-body {
    font-size: 20px;
    line-height: 30px;
}

.vector-feature-custom-font-size-clientpref-2 .mw-body h1, .vector-feature-custom-font-size-clientpref-2.mw-body .mw-heading1, .vector-feature-custom-font-size-clientpref-2.mw-body-content h1, .vector-feature-custom-font-size-clientpref-2.mw-body-content .mw-heading1, .vector-feature-custom-font-size-clientpref-2 h1 {
    font-size: 32px;
    line-height: 42px;
}

.vector-feature-custom-font-size-clientpref-2 .mw-body .mw-heading2, .vector-feature-custom-font-size-clientpref-2.mw-body h2, .vector-feature-custom-font-size-clientpref-2 h2 {
    font-size: 28px;
    line-height: 38px;
}

.vector-feature-custom-font-size-clientpref-2 .mw-body .mw-heading3, .vector-feature-custom-font-size-clientpref-2.mw-body h3, .vector-feature-custom-font-size-clientpref-2 h3 {
    font-size: 24px;
    line-height: 34px;
}

.vector-feature-custom-font-size-clientpref-2 .mw-body .mw-heading4, .vector-feature-custom-font-size-clientpref-2.mw-body h4, .vector-feature-custom-font-size-clientpref-2.mw-body .mw-heading5, .vector-feature-custom-font-size-clientpref-2.mw-body h5, .mw-body .mw-heading6, .vector-feature-custom-font-size-clientpref-2.mw-body h6, .vector-feature-custom-font-size-clientpref-2 h4, .vector-feature-custom-font-size-clientpref-2 h5, .vector-feature-custom-font-size-clientpref-2 h6 {
    font-size: 20px;
    line-height: 30px;
}

.vector-feature-custom-font-size-clientpref-2 #siteSub {
    font-size: 18px;
    line-height: 28px;
}

.vector-feature-custom-font-size-clientpref-2 .mw-parser-output .reflist {
    font-size: 18px;
    line-height: 28px;
}

To prototype this type scale in Minerva, insert the following code into your minerva.css file:

.mf-font-size-clientpref-small .mw-body p, .mf-font-size-clientpref-small .content p {
    font-size: 16px;
    line-height: 26px;
}

.mf-font-size-clientpref-small .mw-body h1, .mf-font-size-clientpref-small .mw-body .mw-heading1, .mf-font-size-clientpref-small .mw-body-content h1, .mf-font-size-clientpref-small .mw-body-content .mw-heading1, .mf-font-size-clientpref-small h1 {
    font-size: 28px;
    line-height: 38px;
}

.mf-font-size-clientpref-small .mw-body .mw-heading2, .mf-font-size-clientpref-small .mw-body h2, .mf-font-size-clientpref-small h2 {
    font-size: 24px;
    line-height: 34px;
}

.mf-font-size-clientpref-small .mw-body .mw-heading3, .mf-font-size-clientpref-small .mw-body h3, .mf-font-size-clientpref-small h3 {
    font-size: 20px;
    line-height: 30px;
}

.mf-font-size-clientpref-small .mw-body .mw-heading4, .mf-font-size-clientpref-small .mw-body h4, .mf-font-size-clientpref-small .mw-body .mw-heading5, .mf-font-size-clientpref-small .mw-body h5, .mf-font-size-clientpref-small .mw-body .mw-heading6, .mf-font-size-clientpref-small .mw-body h6, .mf-font-size-clientpref-small h4, .mf-font-size-clientpref-small h5, .mf-font-size-clientpref-small h6 {
    font-size: 16px;
    line-height: 26px;
}

.mf-font-size-clientpref-small #siteSub {
    font-size: 14px;
    line-height: 22px;
}

.mf-font-size-clientpref-small .mw-parser-output .reflist {
    font-size: 14px;
    line-height: 22px;
}

.mf-font-size-clientpref-regular .mw-body p, .mf-font-size-clientpref-regular .content p {
    font-size: 18px;
    line-height: 28px;
}

.mf-font-size-clientpref-regular .mw-body h1, .mf-font-size-clientpref-regular.mw-body .mw-heading1, .mf-font-size-clientpref-regular.mw-body-content h1, .mf-font-size-clientpref-regular.mw-body-content .mw-heading1, .mf-font-size-clientpref-regular h1 {
    font-size: 30px;
    line-height: 40px;
}

.mf-font-size-clientpref-regular .mw-body .mw-heading2, .mf-font-size-clientpref-regular.mw-body h2, .mf-font-size-clientpref-regular h2 {
    font-size: 26px;
    line-height: 36px;
}

.mf-font-size-clientpref-regular .mw-body .mw-heading3, .mf-font-size-clientpref-regular.mw-body h3, .mf-font-size-clientpref-regular h3 {
    font-size: 22px;
    line-height: 32px;
}

.mf-font-size-clientpref-regular .mw-body .mw-heading4, .mf-font-size-clientpref-regular.mw-body h4, .mf-font-size-clientpref-regular.mw-body .mw-heading5, .mf-font-size-clientpref-regular.mw-body h5, .mw-body .mw-heading6, .mf-font-size-clientpref-regular.mw-body h6, .mf-font-size-clientpref-regular h4, .mf-font-size-clientpref-regular h5, .mf-font-size-clientpref-regular h6 {
    font-size: 18px;
    line-height: 28px;
}

.mf-font-size-clientpref-regular #siteSub {
    font-size: 16px;
    line-height: 26px;
}

.mf-font-size-clientpref-regular .mw-parser-output .reflist {
    font-size: 16px;
    line-height: 26px;
}

.mf-font-size-clientpref-large .mw-body p, .mf-font-size-clientpref-large .content p {
    font-size: 20px;
    line-height: 30px;
}

.mf-font-size-clientpref-large .mw-body h1, .mf-font-size-clientpref-large.mw-body .mw-heading1, .mf-font-size-clientpref-large.mw-body-content h1, .mf-font-size-clientpref-large.mw-body-content .mw-heading1, .mf-font-size-clientpref-large h1 {
    font-size: 32px;
    line-height: 42px;
}

.mf-font-size-clientpref-large .mw-body .mw-heading2, .mf-font-size-clientpref-large.mw-body h2, .mf-font-size-clientpref-large h2 {
    font-size: 28px;
    line-height: 38px;
}

.mf-font-size-clientpref-large .mw-body .mw-heading3, .mf-font-size-clientpref-large.mw-body h3, .mf-font-size-clientpref-large h3 {
    font-size: 24px;
    line-height: 34px;
}

.mf-font-size-clientpref-large .mw-body .mw-heading4, .mf-font-size-clientpref-large.mw-body h4, .mf-font-size-clientpref-large.mw-body .mw-heading5, .mf-font-size-clientpref-large.mw-body h5, .mw-body .mw-heading6, .mf-font-size-clientpref-large.mw-body h6, .mf-font-size-clientpref-large h4, .mf-font-size-clientpref-large h5, .mf-font-size-clientpref-large h6 {
    font-size: 20px;
    line-height: 30px;
}

.mf-font-size-clientpref-large #siteSub {
    font-size: 18px;
    line-height: 28px;
}

.mf-font-size-clientpref-large .mw-parser-output .reflist {
    font-size: 18px;
    line-height: 28px;
}

See this patch for how DST is currently thinking this will be done technically.

Event Timeline

CCiufo-WMF triaged this task as Medium priority.Jul 11 2024, 2:58 PM

The Web and DST teams agreed with the general approach proposed in this task, for scaling article content only. The question of scaling the rest of the interface is captured in T370549. Further investigation is needed to finalize the PoC in Codex and figure out how it can be integrated into the skins. @Jdrewniak will lead independent spikes for integrating the proposal into Vector and Minerva.

I just created the two spikes mentioned above
https://phabricator.wikimedia.org/T375934 - [Spike][Vector] Scope Codex typographic scale adoption for Vector 2022 skin
https://phabricator.wikimedia.org/T375940 - [Spike][Minerva] Scope Codex typographic scale adoption for MinervaNeue skin