-
Notifications
You must be signed in to change notification settings - Fork 10
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
Stop embedding the Inter font and publish CommonJS packages again #48
Conversation
Deploying with Cloudflare Pages
|
:root { | ||
/* This is a false positive */ | ||
/* stylelint-disable unit-no-unknown */ | ||
--cpd-inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, |
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.
I just don't know about that. I know the @font-face in @fontsource/inter has some unicode ranges, but I don't know if it properly excludes the emojis or not. Do we have a way to test that?
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 i've actually removed global.css
from the exported CSS.
It's still used in Storybook, but right now it is not a great idea to have all of that.
This bit is particularly critical for Element Web, but a bit less for other projects. We do have visual regression tests for it on Percy yes. But only for EW.
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.
Makes sense, looks good to me!
This stops the embedding of the inter font and instead rely on the @fontsource/inter package.
This means that consumers need to install the package and import the font themselves.
It is set as peer dependency, so it will warn if the consumer does not have it installed.
It also means we can switch back to library mode, and emit commonjs builds alongside esm builds.
For consumers, the change is instead of importing just
@vector-im/compound-web/dist/index.css
, they need to: