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 font settings [take 2] #2919

Merged
merged 25 commits into from Feb 22, 2019
Merged

Improve font settings [take 2] #2919

merged 25 commits into from Feb 22, 2019

Conversation

thisisdano
Copy link
Member

@thisisdano thisisdano commented Feb 22, 2019

Improvements

Breaking changes
This PR introduces a number of changes into the way typography settings are named and used.

old settings new settings
$theme-font-path in settings-general $theme-font-path in settings-typography
$theme-font-definitions $theme-typeface-tokens
$theme-font-definitions.[token].name $theme-typeface-tokens.[token].display-name
removed generate, system-font, and variable-font keys from typeface token maps
moved custom font source and directory data to $theme-font-[type]-custom-src
moved custom font stack data to $theme-font-[type]-custom-stack
$theme-font-[type] $theme-font-type-[type]
$theme-font-[role] $theme-font-role-[role]
$theme-font-[role] accepts $theme-font-[type] variables $theme-font-[role] accepts font-type tokens like 'mono', 'sans', and 'serif'
$theme-output-all-weights $theme-generate-all-weights
no longer import core/font-definitions — this file is deprecated

- $theme-font-definitions --> $theme-typeface-tokens
- Add better explanatory text
- Use clearer variable names
- Allow generating from custom src
- font definitions are now typeface-tokens
- typeface tokens and font stacks are now in system tokens
- there are now system-typeface-tokens and theme-typeface-tokens
-
- loop through a map ($project-font-type-tokens) instead of manual
- use more accurate variable names
- collect project font type data in a map ($project-font-type-tokens) for looping, etc
- $project-fonts-by-role --> $project-font-role-tokens
- Add validate-typeface-token() function
- Improve and adapt the cap-height() function
- Add convert-to-font-type() fn to convert font-role tokens
- Simplify get-font-stack() function
- get-face-token() --> get-typeface-token()
- in general, use token terminology more rigorously
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

1 participant