-
Notifications
You must be signed in to change notification settings - Fork 148
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
add custom web fonts guidance #1905
Conversation
|
Looks like the failure is in my html |
|
@bonnieAcameron I'll take a look. For reference, if you click on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bonnieAcameron pushed up some changes. Guidance should look like this now:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bonnieAcameron I added a few comments with some questions and suggestions.
Please let me know if you have questions!
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
…stom-font-guidance
…nt token ' section
|
@bonnieAcameron @mejiaj Some of the changes are just to bring some clarity to the copy, while some are dev fixes because I couldn't get the example code to work. Feel free to take any, all, or none of the changes. Let me know if you have questions. |
USWDS-Site - Font family: Custom fonts content edits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bonnieAcameron Looks good to me! (FYI I pushed up a small typo fix in 093d75c)
@mejiaj Can you give a sanity check on the changes made, particularly the new values for $theme-font-role-?
| @@ -163,9 +165,9 @@ Role-based tokens set the font family value based on the _role_ the face plays i | |||
| **Note:** It is possible to add **custom font metadata**, **custom font stacks**, and **custom font source files** in your USWDS settings. This documentation is coming soon. See the inline documentation in `_uswds-theme-typography` for more details. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly out of scope, but this file name is out of date. We can also link to the file directly for easy reference. Also thinking this note might be better placed at the bottom of the page, below the new "Creating a custom typeface token" section. But now I might be getting out of hand, scope-wise ;)
| **Note:** It is possible to add **custom font metadata**, **custom font stacks**, and **custom font source files** in your USWDS settings. This documentation is coming soon. See the inline documentation in `_uswds-theme-typography` for more details. | |
| **Note:** It is possible to add **custom font metadata**, **custom font stacks**, and **custom font source files** in your USWDS settings. This documentation is coming soon. See the inline documentation in [_settings-typography.scss](https://github.com/uswds/uswds/blob/develop/packages/uswds-core/src/styles/settings/_settings-typography.scss) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related, should we create documentation for these? If not, maybe we can remove the coming soon line?
…stom-font-guidance
|
@bonnieAcameron I updated this branch and added another couple of comments for your review. Let me know if you have questions or comments! @mejiaj Can you give a sanity check on the changes made, particularly the new values for |
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
|
Note: This guidance is only one of two options available for adding a custom font. We should add instructions for adding a custom self-hosted font. I can work on writing that and will submit it for review shortly. |
|
@bonnieAcameron @mejiaj I also added a changelog entry (we'll need to update the merge date here when we have it). Let me know if you have any questions or want to change up the formatting. |
USWDS-Site: Add instructions for adding self-hosted font



Updating Custom Fonts Guidance
Preview link →
Description
Based on a high number of repeat questions asking for custom (web) fonts, I've created this guidance with review from core devs.
Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm testand make sure the tests for the files you have changed have passed.