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

Add 36 to type scale and swap headings to use it #989

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

edwardhorsford
Copy link
Contributor

@edwardhorsford edwardhorsford commented Jul 22, 2024

Description

In our typography scale, the large size seems smaller than necessary. On GOV.UK it's 36px, whereas in NHS it's 32px. Once our heading guidance is updated, we may see more headings using the large size, so I am proposing updating our type scale to use 36px rather than 32px.

The GOV.UK scale goes:

  • Desktop: 24px > 36px > 48px
  • Mobile: 21px > 27px > 32px

NHS:

  • Desktop: 24px > 32px > 48px
  • Mobile: 20px > 24px > 32px

To swap the size would likely be a breaking change - users may be relying on the .nhsuk-u-font-size-32 classes or passing 32 to the font mixins.

I am proposing adding 36 to the scale and updating the heading mixins to use it, and leave 32 for now. We can then remove 32 from the scale at the next major version.

Mobile before Mobile after
heading-l-mobile-24px heading-l-mobile-27px
Desktop before Desktop after
heading-l-desktop-32px heading-l-desktop-36px
Scale mobile Scale desktop
heading-scale-mobile heading-scale-desktop

Checklist

@anandamaryon1 anandamaryon1 self-assigned this Aug 7, 2024
@anandamaryon1 anandamaryon1 mentioned this pull request Sep 16, 2024
3 tasks
@anandamaryon1 anandamaryon1 merged commit 3446484 into main Sep 17, 2024
1 of 2 checks passed
@anandamaryon1 anandamaryon1 deleted the update-typography-scale branch September 17, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants