Skip to content
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

perf: finish getting rid of uses of the Roboto font #26552

Merged
merged 2 commits into from
Sep 19, 2024
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 .storybook/metamask-storybook-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
export const metamaskStorybookTheme = {
brandTitle: 'MetaMask Storybook',
// Typography
fontBase: 'Euclid Circular B, Roboto, Helvetica, Arial, sans-serif',
fontBase: 'Euclid Circular B, Helvetica, Arial, sans-serif',
};
9 changes: 9 additions & 0 deletions ui/components/ui/text-field/text-field.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const inputLabelBase = {
color: 'var(--color-text-default)',
};

const fontFamily = [
'"Euclid Circular B"',
'Helvetica',
'Arial',
'sans-serif',
].join(', ');

davidmurdoch marked this conversation as resolved.
Show resolved Hide resolved
const styles = {
materialLabel: {
'&$materialFocused': {
Expand Down Expand Up @@ -60,6 +67,7 @@ const styles = {
},
// Non-material styles
formLabel: {
fontFamily,
'&$formLabelFocused': {
color: 'var(--color-text-alternative)',
},
Expand All @@ -70,6 +78,7 @@ const styles = {
formLabelFocused: {},
inputFocused: {},
inputRoot: {
fontFamily,
'label + &': {
marginTop: '9px',
},
Expand Down
2 changes: 1 addition & 1 deletion ui/css/design-system/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use "sass:map";

$font-family: 'Euclid Circular B', Roboto, Helvetica, Arial, sans-serif;
$font-family: 'Euclid Circular B', Helvetica, Arial, sans-serif;

$typography-variants: (
'h1': 2.5rem,
Expand Down
42 changes: 0 additions & 42 deletions ui/css/utilities/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,6 @@ $font-path: './fonts';
$fa-font-path: $fa-font-path
);

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'), url('#{$font-path}/Roboto/Roboto-Thin.ttf') format('truetype');
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url('#{$font-path}/Roboto/Roboto-Light.ttf') format('truetype');
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url('#{$font-path}/Roboto/Roboto-Regular.ttf') format('truetype');
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url('#{$font-path}/Roboto/Roboto-Medium.ttf') format('truetype');
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url('#{$font-path}/Roboto/Roboto-Bold.ttf') format('truetype');
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
src: local('Roboto Black'), local('Roboto-Black'), url('#{$font-path}/Roboto/Roboto-Black.ttf') format('truetype');
}

@font-face {
font-family: 'Euclid Circular B';
font-style: normal;
Expand Down
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Black.ttf
Binary file not shown.
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Italic.ttf
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Medium.ttf
Binary file not shown.
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Regular.ttf
Binary file not shown.
Binary file removed ui/css/utilities/fonts/Roboto/Roboto-Thin.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 0 additions & 5 deletions ui/pages/swaps/fee-card/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@
&__bold {
font-weight: bold;
}

&__tilde {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find any use of this class anywhere in our compiled code.

font-family: Roboto, Helvetica, Arial, sans-serif;
margin-right: -3.5px;
}
}

.info-tooltip {
Expand Down