-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: add fonts to the system #100
Conversation
f956690
to
e59fcee
Compare
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.
The font files were copied from https://github.com/freeCodeCamp/freeCodeCamp/tree/main/client/static/fonts.
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.
fontFamily: { | ||
sans: ["Lato", "sans-serif"], | ||
mono: ["Hack-ZeroSlash", "monospace"], | ||
}, |
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.
These are currently unused, but will be needed when we enable Tailwind preflight (#61).
Thanks for adding the fonts. |
How does this work with the client's fonts? If we're telling tailwind the fonts live in That said, the client already imports the fonts in two ways via import latoBoldURL from '../../../static/fonts/lato/Lato-Light.woff'; and via @font-face {
font-family: 'Lato';
src: url('../../../static/fonts/lato/Lato-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: fallback;
} so it seems like we already have extra imports. @ahmaxed should one of these go? |
What I have in mind right now:
That is just the high level approach though. I still need to sort out the
I noticed this, too, but I assumed/thought the imports in I'll defer this to Ahmad. (Though I could remove those imports as part of the CSS cleanup if they are redundant.) |
Sounds good! I was just a bit confused about how these fonts related to the /learn fonts.
Yeah, I think Gatsby bundles them (via webpack). I'd have to dig into it to understand exactly what's used and why, though. |
Checklist:
Update index.md
)I noticed that Storybook doesn't display text in Lato font, even though we do have the
font-family
rule specified.ui/src/global-element-styles.css
Line 71 in e021cb2
This is simply because we don't have the font files and font definitions in the repo.
This PR adds the following fonts to the library: