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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- $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
This was referenced Feb 22, 2019
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improvements
'lang'
font-type (Consider adding alang
theme type family #2683)'icon'
font-type (Consider adding anicon
type family / Add font-awesome to supported fonts #2855)font-display: fallback
to@font-face
declarations to improve rendering speed (Add font-display params to @font-face declarations #2744)Breaking changes
This PR introduces a number of changes into the way typography settings are named and used.
$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
generate
,system-font
, andvariable-font
keys from typeface token maps$theme-font-[type]-custom-src
$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]
acceptsfont-type
tokens like'mono'
,'sans'
, and'serif'
$theme-output-all-weights
$theme-generate-all-weights
core/font-definitions
— this file is deprecated