-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(fonts): add google font support via flag #10393
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 0b54c93 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61e1bf09f6e411000736af4c 😎 Browse the preview: https://deploy-preview-10393--carbon-react-next.netlify.app |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 0b54c93 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61e1bf09eb25010008c78ba4 😎 Browse the preview: https://deploy-preview-10393--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 0b54c93 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61e1bf09d273f50008cdbee8 😎 Browse the preview: https://deploy-preview-10393--carbon-components-react.netlify.app |
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.
Looks good to me! Pulls in fonts from google as expected 👍
b11b49b
to
6b266ab
Compare
🔥 great work on this! |
Closes #10353
Adds in out-of-the-box support for Google fonts by enabling the
$use-google-fonts
flag. It has been turned on by default for testing purposes.If turned on, it will create the
src
field from google data, rather than resolve to the installed plex package.Changelog
New
$use-google-fonts
flag, which if enabled will provide font files directly from the Google static server rather than the@ibm/plex
package itself.@styles/scss/fonts/_src.scss
Testing / Reviewing
First, navigate to the IBM Plex story in the
carbon-react
storybook. Then, in dev tools, go to the Network tab, hit record, and do a hard refresh. Thewoff
files should resolve to Google servers. If testing locally, flip the flag tofalse
and see that the path is now set to the locally installed font files.Before merging the flag should be set to
false
by default.