Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 and H3 headings too similar visually #97

Closed
Tracked by #72
gabalafou opened this issue May 28, 2024 · 2 comments · Fixed by pydata/pydata-sphinx-theme#1983
Closed
Tracked by #72

H2 and H3 headings too similar visually #97

gabalafou opened this issue May 28, 2024 · 2 comments · Fixed by pydata/pydata-sphinx-theme#1983

Comments

@gabalafou
Copy link
Contributor

No description provided.

@isabela-pf isabela-pf changed the title H2 and H3 headings too similar visually [M] H2 and H3 headings too similar visually May 30, 2024
@gabalafou gabalafou changed the title [M] H2 and H3 headings too similar visually H2 and H3 headings too similar visually May 31, 2024
@gabalafou gabalafou added the size: M One to two weeks label May 31, 2024
@isabela-pf isabela-pf self-assigned this May 31, 2024
@smeragoel smeragoel self-assigned this Jul 25, 2024
@isabela-pf isabela-pf removed their assignment Aug 1, 2024
@smeragoel
Copy link

smeragoel commented Aug 26, 2024

I believe the solution is to adopt a medium contrast type scale, which provides balanced contrast between heading sizes without overly large jumps. A type scale refers to the multiple by which font sizes increase. You can find more about typographic scales here: Typographic Scales.

For content-heavy websites like ours, a medium contrast scale is ideal, typically ranging from 1.2x - 1.33x. The larger the scale, the more contrast between heading sizes. However, I don’t want a drastic deviation from our current font sizes, as this could disrupt the look and feel of projects using our theme.

Constraints

  • Minimum size of 16px for accessibility.
  • Avoid major deviations from the current sizes.

Given these constraints, we're limited to a scale of approximately 1.2x. I’ve used the Minor Third scale (1.2x) and rounded the values to the nearest even whole number, with the Major Third scale (1.25x) added for reference:

Heading Current Size (px) Current Scale Major Third (1.25x) Minor Third (1.2x, rounded off) Suggested Size (px) Calculated Suggested Scale
H1 40 - 49 40 42 -
H2 32 1.25 39 33 34 1.23
H3 28 1.143 31 28 28 1.214
H4 24 1.167 25 23 24 1.167
H5 20 1.2 20 19 20 1.2
H6 18 1.111 16 16 16 1.25

Summary:

  • Except for the H4 to H3 transition, all headings have a minimum of a 1.2x increase, which is an improvement over the current scale.
  • I also suggest using a 600 weight for better legibility across headings. I added these details and some examples in Figma: Updated Heading Typography
  • H6 is now set to 16px, the same size as the body text. The increased font weight does help differentiate it from body text, but I would like to discuss whether this distinction is sufficient.

Here’s a final comparison of current vs. suggested values:

Heading Current Size (px) Current Size (rem) Suggested Size (px) Suggested Size (rem)
H1 40 2.500 42 2.625
H2 32 2.000 34 2.125
H3 28 1.750 28 1.750
H4 24 1.500 24 1.500
H5 20 1.250 20 1.250
H6 18 1.125 16 1.000

@smeragoel
Copy link

This was discussed today and the final recommendations of new font size and increased font weight was accepted within the team. This is now ready for dev 💻

Final Recommendations:

Heading Current Size (px) Current Size (rem) Suggested Size (px) Suggested Size (rem)
H1 40 2.500 42 2.625
H2 32 2.000 34 2.125
H3 28 1.750 28 1.750
H4 24 1.500 24 1.500
H5 20 1.250 20 1.250
H6 18 1.125 16 1.000

Font Weight: 600

And also some designs and examples in Figma: Updated Typography (#97)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 💪🏾 Done
Development

Successfully merging a pull request may close this issue.

4 participants