-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathtypography.js
More file actions
39 lines (32 loc) · 929 Bytes
/
typography.js
File metadata and controls
39 lines (32 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import Typography from "typography";
import WordPress2016 from "typography-theme-wordpress-2016";
WordPress2016.headerFontFamily = "BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif".split(
", ",
);
WordPress2016.headerWeight = 700;
WordPress2016.overrideThemeStyles = () => {
return {
":root": {
"--ui-font": WordPress2016.headerFontFamily.join(","),
},
h1: {
fontFamily: "var(--ui-font)",
fontWeight: 700,
},
"a.gatsby-resp-image-link": {
boxShadow: "none",
},
".gatsby-highlight": {
fontSize: "0.9em",
},
};
};
delete WordPress2016.googleFonts;
const typography = new Typography(WordPress2016);
// Hot reload typography in development.
if (process.env.NODE_ENV !== "production") {
typography.injectStyles();
}
export default typography;
export const rhythm = typography.rhythm;
export const scale = typography.scale;