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.
This fixes a problem where we might be outputting font stacks with a leading comma or using a redundant display name at the start of the stack.
We have four internal font stacks that we can assign to to typefaces, composed of common fallbacks installed on most systems:
Plus, users can define custom stacks for font types in settings:
The output font stack is the display name of the typeface plus the value of either the system-assigned stack or the user's custom stack.
For example, Source Sans Pro gets the
$font-stack-helvetica
stack by default and is output asBut the builder should not put a display name at the top of the stack in a couple of scenarios:
helvetica
orgeorgia
) and no custom stack is definedNow the stack builder function is smart enough to do that. It will withhold the leading display name if the display name is
null
(in the case of'system'
) or if the assigned typeface is one of the common system fonts we're already using as a stack (in the case of'georgia'
or'helvetica'
).Fixes #2944