Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "yarn playwright test"
},
"dependencies": {
"@metamask/design-tokens": "^7.1.0",
"@metamask/design-tokens": "^8.0.0",

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@metamask/design-tokens v8 introduces 3 breaking changes (migration guide): (1) font family CentraNo1→Geist, (2) background/muted now transparent, (3) HeadingSMRegular tokens removed. Only (1) applies here — this codebase uses background-alternative and background-default only, and no HeadingSMRegular tokens. The build copies @metamask/design-tokens/styles.css into design-tokens.css at build time, so the --font-family-default CSS variable automatically resolves to Geist after this upgrade.

"@metamask/object-multiplex": "^2.0.0",
"@metamask/post-message-stream": "^8.0.0",
"eth-phishing-detect": "^1.2.0",
Expand Down
Binary file removed static/fonts/CentraNo1-Bold.woff2
Binary file not shown.
Binary file removed static/fonts/CentraNo1-Book.woff2
Binary file not shown.
Binary file removed static/fonts/CentraNo1-Medium.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-Bold.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-BoldItalic.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-Medium.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-MediumItalic.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-Regular.woff2
Binary file not shown.
Binary file added static/fonts/Geist/Geist-RegularItalic.woff2
Binary file not shown.
55 changes: 39 additions & 16 deletions static/index.css
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');

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 metamask-design-system/apps/storybook-react/fonts/Geist. This ensures any future use of font-style: italic in this page renders correctly with the bundled font rather than relying on browser faux-italic synthesis.

}

@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');
}

* {
Expand All @@ -30,7 +52,7 @@ html {
}

body {
background-color: var(--color-background-alternative);
background-color: var(--color-background-default);

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 (data-theme="dark" on <html>), --color-background-default produces the standard dark surface, consistent with how the extension renders full-page views.

height: 100%;
display: flex;
align-items: center;
Expand Down Expand Up @@ -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);

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 --color-primary-default (blue) styling was from an older design iteration. The icon-based tokens produce a dark button with light text in the dark theme — matching the extension's current button appearance. This also removes the need for the data-theme="light" override that was previously on this button in index.html.

padding-right: 16px;
padding-left: 16px;
border-radius: 12px;
Expand All @@ -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);

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The old hover state kept background-color: var(--color-primary-default) — identical to the default state, meaning no visible hover feedback. The new tokens (--color-icon-default-hover, --color-icon-default-pressed) provide distinct visual states. Also adds border-color tracking on hover, which was previously missing — the border would stay the default color while the background changed, causing a visual mismatch.

}

.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);
Comment thread
georgewrmarshall marked this conversation as resolved.
}

.button-link-danger {
Expand Down
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">

@georgewrmarshall georgewrmarshall Mar 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 --color-primary-* tokens. With the token migration to --color-icon-*, the button now renders correctly under the page's native data-theme="dark" context (set on <html>), making the per-element theme override unnecessary.

Back to safety
</button>

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1605,10 +1605,10 @@ __metadata:
languageName: node
linkType: hard

"@metamask/design-tokens@npm:^7.1.0":
version: 7.1.0
resolution: "@metamask/design-tokens@npm:7.1.0"
checksum: 3a6e33887ef8259a9cbed9760664c5b533690b8ceab50fa1f19cd302cbf3a9e4ab62d3157fdcfcc9e693c5049ca7fa71feb44861a8122fcc1280dbd78edecc21
"@metamask/design-tokens@npm:^8.0.0":
version: 8.2.2
resolution: "@metamask/design-tokens@npm:8.2.2"
checksum: b5fef1e5931af19ecf988e00dbc8d4d589ff2c6ea2224d4c4850b181bdd94b9de203dce40cf59796e57ae0e6eda7a1913b16b04b2799f5fc7a81b4cd84096dd1
languageName: node
linkType: hard

Expand Down Expand Up @@ -1669,7 +1669,7 @@ __metadata:
"@babel/preset-typescript": ^7.22.15
"@lavamoat/allow-scripts": ^3.0.4
"@metamask/auto-changelog": ^3.4.3
"@metamask/design-tokens": ^7.1.0
"@metamask/design-tokens": ^8.0.0
"@metamask/eslint-config": ^9.0.0
"@metamask/eslint-config-nodejs": ^9.0.0
"@metamask/eslint-config-typescript": ^9.0.1
Expand Down
Loading