Skip to content

Commit 183ab6c

Browse files
committed
refactor(themes): correctly define font family tokens
1 parent ea569cb commit 183ab6c

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

core/scripts/testing/styles.css

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/css/core.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@
77
// Ionic Font Family
88
// --------------------------------------------------
99

10+
// TODO(FW-6744): Remove this after adding the ios tokens
1011
html.ios {
11-
--ion-default-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif;
12-
}
13-
html.md {
14-
--ion-default-font: "Roboto", "Helvetica Neue", sans-serif;
12+
--ion-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif;
1513
}
1614

1715
html {
1816
--ion-dynamic-font: -apple-system-body;
19-
--ion-font-family: var(--ion-default-font);
2017
}
2118

2219
body {

core/src/css/ionic/core.ionic.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
--background: #{globals.$ion-bg-surface-default};
99
}
1010

11-
html {
12-
--ionic-dynamic-font: -apple-system-body;
13-
}
14-
1511
body {
1612
background: var(--ion-background-color, #{globals.$ion-bg-body});
1713
color: var(--ion-text-color, #{globals.$ion-text-default});

core/src/css/ionic/typography.ionic.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// TODO(ROU-10833): add font loading solution here, as a @font-face, base64 or cdn
44
html {
5-
font-family: globals.$ion-font-family;
5+
font-family: var(--ion-font-family);
66
}
77

88
body {

core/src/themes/ionic/default.tokens.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export const defaultTheme: DefaultTheme = {
1818
formHighlight: true,
1919
},
2020

21-
// TODO(FW-6745): see if we can remove this after the md tokens are added
22-
fontFamily: 'initial',
21+
fontFamily:
22+
'-apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2323

2424
spacing: {
2525
xxxxs: 'var(--ion-spacing-25)',

core/src/themes/md/default.tokens.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ export const defaultTheme: DefaultTheme = {
1313
light: lightTheme,
1414
dark: darkTheme,
1515
},
16+
17+
fontFamily: '"Roboto", "Helvetica Neue", sans-serif',
1618
};

0 commit comments

Comments
 (0)