-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[polaris.shopify.com] Load correct Inter variable font weights #10895
Conversation
@@ -6,6 +6,6 @@ | |||
/> | |||
<link | |||
id="inter-font-link" | |||
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" | |||
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;450;500;600;650;700;800;900&display=swap" |
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 saw you removed 100, 200, 300, 800, 900 in other places, can they be removed here too?
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.
Looking at our tokens it seems like we can 450, 550, 650, 700
https://github.com/Shopify/polaris/blob/next/polaris-tokens/src/themes/base/font.ts#L96-L107
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes #10894 <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? Load the correct font weights for regular ~`400`~ `450` and semibold ~`600`~ `650` tokens. Updates migration guide and any other documentation (like the readme) where the Inter font load string is present to include the correct weights, and removes unnecessary weights (`100`, `200`, `300` and `800`, `900`) Before: ![image](https://github.com/Shopify/polaris/assets/67433661/9755c831-1a1b-4ca0-883b-c225ef4f1161) After: ![image](https://github.com/Shopify/polaris/assets/67433661/045edf8b-cdbe-4c6c-97f7-f47b6182c705) ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes #10894 <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? Load the correct font weights for regular ~`400`~ `450` and semibold ~`600`~ `650` tokens. Updates migration guide and any other documentation (like the readme) where the Inter font load string is present to include the correct weights, and removes unnecessary weights (`100`, `200`, `300` and `800`, `900`) Before: ![image](https://github.com/Shopify/polaris/assets/67433661/9755c831-1a1b-4ca0-883b-c225ef4f1161) After: ![image](https://github.com/Shopify/polaris/assets/67433661/045edf8b-cdbe-4c6c-97f7-f47b6182c705) ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
…fy#10895) <!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes Shopify#10894 <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? Load the correct font weights for regular ~`400`~ `450` and semibold ~`600`~ `650` tokens. Updates migration guide and any other documentation (like the readme) where the Inter font load string is present to include the correct weights, and removes unnecessary weights (`100`, `200`, `300` and `800`, `900`) Before: ![image](https://github.com/Shopify/polaris/assets/67433661/9755c831-1a1b-4ca0-883b-c225ef4f1161) After: ![image](https://github.com/Shopify/polaris/assets/67433661/045edf8b-cdbe-4c6c-97f7-f47b6182c705) ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
WHY are these changes introduced?
Fixes #10894
WHAT is this pull request doing?
Load the correct font weights for regular
400
450
and semibold600
650
tokens.Updates migration guide and any other documentation (like the readme) where the Inter font load string is present to include the correct weights, and removes unnecessary weights (
100
,200
,300
and800
,900
)Before:
After:
🎩 checklist
README.md
with documentation changes