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

Improve base typographic rhythm #550

Open
1 task
iamthomasbishop opened this issue Feb 6, 2019 · 8 comments
Open
1 task

Improve base typographic rhythm #550

iamthomasbishop opened this issue Feb 6, 2019 · 8 comments
Assignees
Labels
HACK week HACK week June 2020 [Pri] Low [Status] Needs Design [Type] Enhancement Improves a current area of the editor

Comments

@iamthomasbishop
Copy link
Contributor

iamthomasbishop commented Feb 6, 2019

When doing some investigation during some recent Headings font work, I noticed that our base typographic rhythm is a bit cramped. I compared against the following:

  • Core GB: 16 / 1.8
  • Reader (web/mobile): 17 / 1.6
  • iOS Reader Mode: 17 / 1.6
  • Mobile GB (current): 16 / 1.375
  • Mobile GB (proposed): 16 / 1.6 (changed from original post)

For a visual reference, set on a canvas width of 375:

image

I'm tempted to defer to what Reader web/mobile has in terms of line-height, but considering the base font-size is 16 in our case, the 1.5 line-height ends up being a nice round 24pt, which aligns really well with our 16pt grid and our Block top/bottom margins (12pt).

Update: To align with Reader (web/mobile) and iOS Reader Mode, as well as a slightly more breathable line-height, the new spec should be:

  • Base font-size: 16pt
  • Base line-height: 1.6

This should also allow for a nice rhythm agnostic to font-size (think dynamic type).

Punch List

  • Change base line-height of paragraph text to 1.5 1.6. If we have to define a static px value, let's go with 26. The formula is: (font-size) * (line-height multiplier) = (line-height value), rounded up to the next full point.

Bonus points if we can set up a nice type system that scales well with Lists, Quotes, etc. when we get to those blocks.

@iamthomasbishop iamthomasbishop added the [Type] Enhancement Improves a current area of the editor label Feb 6, 2019
@iamthomasbishop iamthomasbishop added this to the Beta milestone Feb 6, 2019
@iamthomasbishop iamthomasbishop self-assigned this Feb 6, 2019
@kjellr
Copy link

kjellr commented Feb 7, 2019

My general rule of line height: pick what seems to be just comfortable enough, and add a point. 🙂

16 / 1.5 seems a bit too tight to me, and I agree that 1.8 might be too much here. Can we try working out a nice round number closer to 1.6?

@iamthomasbishop
Copy link
Contributor Author

My general rule of line height: pick what seems to be just comfortable enough, and add a point.

That's a nice rule 😄 While I was hoping to come up "one standard to rule them all", I'm not sure that "because it aligns to our 8/24 grid" is good enough reason to stick to that pipe dream – especially considering dynamic type sizes on iOS/Android and such.

1.6 does feel pretty good, even if it's not exactly on the 8pt grid. Considering this ratio is also in-line with what we're doing on Reader – and upon reviewing what Apple does for iOS "Reader Mode" (also 1.6 ratio) – I'm going to adjust the proposal to 1.6.

Thanks for the feedback/insight! I think this is also something that we should feel comfortable pushing upstream to Core. // cc @jasmussen

@iamthomasbishop
Copy link
Contributor Author

Updated spec, per discussion:

  • Base font-size: 16pt (no change)
  • Line-height: 1.6 (changed from 1.5)

Preview for visibility:

image

Going to update the original post.

jasmussen pushed a commit to WordPress/gutenberg that referenced this issue Feb 8, 2019
This PR is intended to explore adopting a change that is being explored for mobile Gutenberg in wordpress-mobile/gutenberg-mobile#550. It simply changes the lineheight from 1.8 to 1.6.

It is very important to note that this change affects only the vanilla Gutenberg style — themes can, through editor styles, still customize this to their hearts content.

Thoughts?
@jasmussen
Copy link

Created WordPress/gutenberg#13765, let me know if I got that right!

@SergioEstevao
Copy link
Contributor

@iamthomasbishop is this still a thing we want to do?

@iamthomasbishop
Copy link
Contributor Author

@SergioEstevao Yes, I would still like to do this — it will help a lot with readability and consistency.

@hypest hypest added the HACK week HACK week June 2020 label Jun 9, 2020
@hypest
Copy link
Contributor

hypest commented Jun 10, 2020

Will have a look during this HACK week.

@hypest hypest self-assigned this Jun 10, 2020
@iamthomasbishop
Copy link
Contributor Author

I just wanted to note that we are considering a switch to using the system-default New York serif on iOS (the "new" default serif font as of iOS 12). No change on Android, as Noto Serif is already the system-default serif font.

I recently documented the block contents type scale and the "neutral" type scale for UI typography that we might also want to look into while investigating typography. Obviously this hasn't been updated for to account for the upcoming iOS change but might help as a reference for the time being.

hypest added a commit to WordPress/gutenberg that referenced this issue Jun 11, 2020
Line spacing = LineHeight/fontSize
Per the "Punch List" in wordpress-mobile/gutenberg-mobile#550,
setting the lineheight px value directly to 26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HACK week HACK week June 2020 [Pri] Low [Status] Needs Design [Type] Enhancement Improves a current area of the editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants