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

Use ex unit for measure values #2964

Merged
merged 4 commits into from Mar 18, 2019
Merged

Use ex unit for measure values #2964

merged 4 commits into from Mar 18, 2019

Conversation

thisisdano
Copy link
Member

@thisisdano thisisdano commented Mar 18, 2019

Preview


This updates our measure tokens to use ex units instead of ch per the reasoning in #2960.

This rebalances our measure tokens to be concentrated within our guidance range of 45-90 characters (see https://practicaltypography.com/line-length.html) and should result in output that's more consistent from typeface to typeface because the ex is the height of the x character and our normalization scheme tends to make this value more consistent from face to face.

Now our docs and usa-prose measure are what they say they are: ~75 characters (measure 4).

Screen Shot 2019-03-18 at 10 02 15 AM

However, this is something of a breaking change in that the new measure tokens tend to be narrower than their old values and will need to be updated per the chart that follows.

token desired output new value old value old output in Public Sans
1 ~50 characters 44ex 40ch 51 characters
2 ~66 characters 60ex 60ch 80 characters
3 ~72 characters 64ex 66ch 88 characters
4 ~78 characters 68ex 72ch 95 characters
5 ~86 characters 74ex 77ch 100 characters
6 ~96 characters 88ex
Beta 6 Beta 7
'1' '1'
'2' '4'
'3' '5'
'4' '6'
'5' '6'

Fixes #2960

@thisisdano thisisdano requested a review from a team March 18, 2019 17:07
@thisisdano
Copy link
Member Author

Hm, whuts this new Snyk thing? 🤔

@saracope
Copy link
Contributor

Snyk checks every PR for new vulnerabilities.
I just updated for these specific vulnerabilities. If you pull the latest version of 2.0 it should resolve this.

Copy link
Contributor

@maya maya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We'll also need to update the docs to reflect these changes.

@maya maya merged commit 26210b7 into release-2.0 Mar 18, 2019
@maya maya deleted the dw-update-measure branch March 18, 2019 17:33
@thisisdano
Copy link
Member Author

Yeah, I should have a docs update by later today as part of a big docs/typesetting update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants