-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(fonts): css vars #13362
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): css vars #13362
Conversation
|
| assert.equal( | ||
| resolvedMap | ||
| .get('Roboto') | ||
| .css.includes(':root { --astro-font-Roboto: Roboto, "Roboto fallback: Arial", sans-serif; }'), |
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.
Should --astro-font-Roboto be --astro-font-roboto?
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.
No it's correct in this case because it'm not using kebab in the test, i'm passing the name through
| assert.equal(Array.from(hashToUrlMap.keys()).length > 0, true); | ||
| assert.deepStrictEqual(Array.from(resolvedMap.keys()), ['Roboto']); | ||
| assert.deepStrictEqual(logs, ['Fonts initialized']); | ||
| assert.equal( |
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.
nit: if you manage to use assert.match, use that because it shows the string to evaluate in case there's an error
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'm going to look into this thanks!
Changes
cssVarprop from theFontcomponent as I'll go with another solution (upcoming PR)Testing
Adds unit tests
Docs
N/A