Repository navigation
feat: update default font from CentraNo1 to Geist #210
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,44 @@ | ||
| /* Geist */ | ||
| @font-face { | ||
| font-family: 'CentraNo1'; | ||
| src: url('fonts/CentraNo1-Book.woff2') format('woff2'); | ||
| font-family: 'Geist'; | ||
| font-style: normal; | ||
| font-weight: 400; | ||
| src: url('fonts/Geist/Geist-Regular.woff2') format('woff2'); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old CentraNo1 declarations only covered normal style (Book/Medium/Bold). These Geist declarations add italic variants for each weight (Regular, Medium, Bold), matching the canonical font set from |
||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Geist'; | ||
| font-style: italic; | ||
| font-weight: 400; | ||
| src: url('fonts/Geist/Geist-RegularItalic.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Geist'; | ||
| font-style: normal; | ||
| font-weight: 500; | ||
| src: url('fonts/Geist/Geist-Medium.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'CentraNo1'; | ||
| src: url('fonts/CentraNo1-Medium.woff2') format('woff2'); | ||
| font-family: 'Geist'; | ||
| font-style: italic; | ||
| font-weight: 500; | ||
| src: url('fonts/Geist/Geist-MediumItalic.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Geist'; | ||
| font-style: normal; | ||
| font-weight: 700; | ||
| src: url('fonts/Geist/Geist-Bold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'CentraNo1'; | ||
| src: url('fonts/CentraNo1-Bold.woff2') format('woff2'); | ||
| font-family: 'Geist'; | ||
| font-style: italic; | ||
| font-weight: 700; | ||
| font-style: normal; | ||
| src: url('fonts/Geist/Geist-BoldItalic.woff2') format('woff2'); | ||
| } | ||
|
|
||
| * { | ||
|
|
@@ -30,7 +52,7 @@ html { | |
| } | ||
|
|
||
| body { | ||
| background-color: var(--color-background-alternative); | ||
| background-color: var(--color-background-default); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This aligns the page background with the design system's primary surface color. In the dark theme context ( |
||
| height: 100%; | ||
| display: flex; | ||
| align-items: center; | ||
|
|
@@ -97,9 +119,9 @@ button { | |
| } | ||
|
|
||
| .button-primary { | ||
| color: var(--color-background-default); | ||
| background: var(--color-primary-default); | ||
| border: 1px solid var(--color-primary-default); | ||
| color: var(--color-icon-inverse); | ||
| background: var(--color-icon-default); | ||
| border: 1px solid var(--color-icon-default); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This aligns the primary button with the design system's Button component which uses icon-based tokens for its primary variant. The previous |
||
| padding-right: 16px; | ||
| padding-left: 16px; | ||
| border-radius: 12px; | ||
|
|
@@ -110,14 +132,15 @@ button { | |
| } | ||
|
|
||
| .button-primary:hover { | ||
| color: var(--color-primary-inverse); | ||
| background-color: var(--color-primary-default); | ||
| color: var(--color-icon-inverse); | ||
| background-color: var(--color-icon-default-hover); | ||
| border-color: var(--color-icon-default-hover); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old hover state kept |
||
| } | ||
|
|
||
| .button-primary:active { | ||
| color: var(--color-primary-inverse); | ||
| background-color: var(--color-primary-alternative); | ||
| border-color: var(--color-primary-alternative); | ||
| color: var(--color-icon-inverse); | ||
| background-color: var(--color-icon-default-pressed); | ||
| border-color: var(--color-icon-default-pressed); | ||
|
georgewrmarshall marked this conversation as resolved.
|
||
| } | ||
|
|
||
| .button-link-danger { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ <h1 class="heading-lg">This website might be harmful</h1> | |
| </ul> | ||
|
|
||
| <div class="button-container"> | ||
| <button class="button-primary" id="portfolio-link" data-theme="light"> | ||
| <button class="button-primary" id="portfolio-link"> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This button previously forced a light-theme context on itself to get the desired blue-on-white appearance from |
||
| Back to safety | ||
| </button> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
@metamask/design-tokensv8 introduces 3 breaking changes (migration guide): (1) font family CentraNo1→Geist, (2)background/mutednow transparent, (3)HeadingSMRegulartokens removed. Only (1) applies here — this codebase usesbackground-alternativeandbackground-defaultonly, and noHeadingSMRegulartokens. The build copies@metamask/design-tokens/styles.cssintodesign-tokens.cssat build time, so the--font-family-defaultCSS variable automatically resolves to Geist after this upgrade.