Skip to content
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

Merged
merged 4 commits into from
Jul 29, 2021

Conversation

tw15egan
Copy link
Collaborator

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 to false, but if a user sets this to true, the Arabic font-face declarations will be included. To test this, you can go to the carbon-react storybook index.scss and change the css--plex-arabic flag to false.

When set to false,

you can view the Plex --> Arabic story

Screen Shot 2021-07-28 at 12 54 12 PM

switch the locale to Arabic via the globe icon

Screen Shot 2021-07-28 at 12 56 55 PM

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)

Screen Shot 2021-07-28 at 1 06 49 PM

You can then set the flag back to true and you should see that is a network font

Screen Shot 2021-07-28 at 1 07 36 PM

Changelog

New

  • @ibm/plex is now a dependency of @carbon/styles
  • scss/_font-face.scss will now import the sans, mono and arabic fonts

Changed

  • Prefixed some Grid storybook styles so that they only affected the Grid stories

Removed

  • @ibm/plex as a carbon-react dependency

Testing / Reviewing

Ensure IBM Plex is still served as a network resource in carbon-react and that you can toggle the Arabic font files

@tw15egan tw15egan requested a review from a team as a code owner July 28, 2021 17:12
@tw15egan tw15egan requested review from joshblack and sstrubberg July 28, 2021 17:12
@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ 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

@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ 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

@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 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

Copy link
Contributor

@joshblack joshblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@joshblack
Copy link
Contributor

bump @sstrubberg when you get a sec this afternoon 👀

Copy link
Member

@sstrubberg sstrubberg left a 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. 🎉

@sstrubberg sstrubberg enabled auto-merge (squash) July 29, 2021 20:27
@sstrubberg sstrubberg merged commit 29f7380 into carbon-design-system:main Jul 29, 2021
@tw15egan tw15egan deleted the add-plex-dependecy branch March 3, 2022 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring in IBM Plex to @carbon/styles
3 participants