-
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(Plex): add plex package to @carbon/styles #9350
feat(Plex): add plex package to @carbon/styles #9350
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 5563200 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/610312ca43fb5400075ecfe1 😎 Browse the preview: https://deploy-preview-9350--carbon-react-next.netlify.app |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 5563200 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/610312cab65b580008b61fbc 😎 Browse the preview: https://deploy-preview-9350--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 5563200 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/610312cad2232800075b6435 😎 Browse the preview: https://deploy-preview-9350--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.
🔥
bump @sstrubberg when you get a sec this afternoon 👀 |
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.
So much awesome here. 🎉
Closes #9348
This PR adds in
@ibm/plex
as a dependency of@carbon/styles
so that when a user imports@carbon/styles
or more specifically,@carbon/styles/scss/font-face
, it will bring in all Plex font files needed to render the Plex font.This also adds in an experimental strategy for adding in additional font languages through config flags, i.e.
$css--plex-arabic
. By default, this is set tofalse
, but if a user sets this totrue
, the Arabic font-face declarations will be included. To test this, you can go to thecarbon-react
storybookindex.scss
and change thecss--plex-arabic
flag to false.When set to false,
you can view the Plex --> Arabic story
switch the locale to Arabic via the globe icon
and ensure the IBM Plex Arabic font is either loaded locally (or the fallback font is the computed font family if you do not have the font installed)
You can then set the flag back to true and you should see that is a network font
Changelog
New
@ibm/plex
is now a dependency of@carbon/styles
scss/_font-face.scss
will now import thesans
,mono
andarabic
fontsChanged
Removed
@ibm/plex
as acarbon-react
dependencyTesting / Reviewing
Ensure IBM Plex is still served as a network resource in
carbon-react
and that you can toggle the Arabic font files