hack around the google fonts vs. inter italics mess

This commit is contained in:
2022-10-04 07:25:12 -04:00
parent 8f355922fd
commit b64795ae57
4 changed files with 373 additions and 385 deletions
+6 -21
View File
@@ -144,34 +144,19 @@ export const globalStyles = globalCss(
fontFamily: theme.fonts.sans,
backgroundColor: theme.colors.backgroundInner,
transition: `background ${theme.transitions.fade}`,
// variable font support?
"@supports (font-variation-settings: normal)": {
fontFamily: theme.fonts.sansVar,
},
},
"code, kbd, samp, pre": {
fontFamily: theme.fonts.mono,
},
// variable font support?
"@supports (font-variation-settings: normal)": {
body: {
fontFamily: theme.fonts.sansVar,
},
"code, kbd, samp, pre": {
"@supports (font-variation-settings: normal)": {
fontFamily: theme.fonts.monoVar,
},
// Chrome doesn't automatically slant multi-axis Inter var, for some reason.
// Adding "slnt" -10 fixes Chrome but then over-italicizes in Firefox. AHHHHHHHHHH.
em: {
fontStyle: "normal",
fontVariationSettings: `"ital" 1, "slnt" -10`,
// Roboto Mono doesn't have this problem, but the above fix breaks it, of course.
"& code, & kbd, & samp, & pre": {
fontStyle: "italic !important",
fontVariationSettings: "initial !important",
},
},
},
}
);