mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-08 20:45:31 -04:00
hack around the google fonts vs. inter italics mess
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user